[Flac-dev] Bits per Sample, Channel Count

Josh Coalson xflac at yahoo.com
Fri Feb 15 14:11:36 PST 2002


--- Ingo Ralf Blum <ingoralfblum at gmx.de> wrote:
> Hi,
> 
> 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
> count
> 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
> by
> design? Currently I check, whether a frame was read and if so use the
> FLAC__stream_decoder_get_??? methods to retrieve the sample rate,
> channel
> count and sample size, and if not I just return the values stored in
> the
> 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?

Josh


__________________________________________________
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com




More information about the Flac-dev mailing list