[linux-audio-dev] libsndfile: type combinations and string data

martin rumori lists at rumori.de
Mon Aug 30 19:58:32 UTC 2004


hi erik,

i've got a question regarding type combinations in libsndfile:

SF_FORMAT_FLOAT | SF_ENDIAN_CPU works with SF_FORMAT_AU on any
platform, which is great.  but it doesn't work with neither aiff nor
wav.  i expected that it would work with one of the both formats,
depending on the host endianess.

is there a special reason why it does not?


some other questions regarding string data:

snd does not explicitly allow using string data in the file format.
however, i remember that it was done in the old NeXT days by
increasing the data offset and using the space in between for a
comment.  do you think this could be implemented in libsndfile for the
SF_STR_COMMENT thing or is that just too non-standard?

with SF_FORMAT_AIFF, i can't write string data to the file in SFM_RDWR
mode.  the call to sf_set_string() succeeds, but the actual data in
the file is not changed.  the call to sf_set_string() succeeds even
when the file is in SFM_READ mode.

with SF_FORMAT_WAV, a file with string data can't be opened with
SFM_RDWR anymore.  this means there is no way to change the audio data
or the comment of the file without copying it?  i guess there is a
special reason for that...

thanks very much for your patience...

bests,

martin



More information about the Linux-audio-dev mailing list