[Flac-dev] Bits per Sample, Channel Count
xflac at yahoo.com
Fri Feb 15 14:11:36 PST 2002
--- Ingo Ralf Blum <ingoralfblum at gmx.de> wrote:
> these two values can be stored in the stream info metadata block as
> well as
> in the header of each frame. This leads to some questions.
> - Are these values supposed to change during playback, e.g. first
> comes a
> frame with 2 channels, then with four and the next switches the bit
> from 16 to 8 and so on?
they are allowed to change, but that doesn't mean it has
to be supported in every app. even in 'flac' changes are
currently ignored (I guess it should print an error).
the only place this really makes sense to support is in
a streaming situation.
> - There are methods to retrieve these values from the stream decoder.
> Unfortunately these only work, when a frame was already read. Is this
> design? Currently I check, whether a frame was read and if so use the
> FLAC__stream_decoder_get_??? methods to retrieve the sample rate,
> count and sample size, and if not I just return the values stored in
> stream info metadata block.
I don't know if this will help, but when libFLAC calls your
write callback, it will pass you a whole FLAC__Frame, from
which you can get that info. or is that too late also?
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail
More information about the Flac-dev