[Flac-dev] FLAC as part of the Ogg project?

Christer Palm palm at nogui.se
Tue Feb 5 23:19:02 PST 2002

Josh Coalson wrote:

> but
> the bad news is that there is no way to determine the frame
> length except by decoding.

Yes, I realized that... :-(

> I'm not exactly sure what the read constraint you mention
> means but it might be helpful to tweak the value for
> to be something larger (just guessing).  that value should
> probably be exposed in the API.

Well, what is happening is that I get a call from a framework whenever 
there is data available to decode. Inside that function, I imagine two 
choices - put the data on hold (if I don't have enough data for a full 
frame), or call FLAC__stream_decoder_process_one_frame() (if I *do* have 
enough data for a full frame). Obviously, I can't do that currently.

Right now, I kick off a separate decoding thread and have the 
flac_read() callback block on a condition variable whenever there's no 
data available to return to FLAC. It works, but it's extremely ugly :-)

Christer Palm

More information about the Flac-dev mailing list