[linux-audio-dev] Additional chunks in WAV files with libsndfile ?
Erik de Castro Lopo
mle+la at mega-nerd.com
Mon Jan 23 22:02:23 UTC 2006
fons adriaensen wrote:
> Hi all,
>
> is there a recommended way to write / read additional chunks in
> WAV files, using libsndfile (assuming it's possible at all - I
> didn't find any hints to this in the docs) ?
libsndfile already supports the addition of a number of specific
chunk types like PEAK, strings in the INFO chunk etc.
> What I need in particular is some way to calibrate the time
> axis - i.e. to say frame #N corresponds to t = 0, and some
> other similar info, mostly sample indices.
There is no existing chunk type which does what you require. In
addition, it would be a bad idea to define your own custom
chunk type to do this.
However, it would be possible to add a comment string containing
the data you require as a text string. See:
http://www.mega-nerd.com/libsndfile/api.html#string
HTH,
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
"The object-oriented model makes it easy to build up programs by
accretion. What this often means, in practice, is that it provides
a structured way to write spaghetti code." -- Paul Graham
More information about the Linux-audio-dev
mailing list