Re: Thoughts/ideas on decompressing parts of an MP3 stream
Re: Thoughts/ideas on decompressing parts of an MP3 stream
- Subject: Re: Thoughts/ideas on decompressing parts of an MP3 stream
- From: "David M. Cotter" <email@hidden>
- Date: Wed, 14 Mar 2007 12:49:16 -0700
basically you have to allow the receiving buffer to accept a variably
sized chunk of uncompressed data. you can't really have a fixed size
for your PCM buffer.
here's what i do:
compressed MP3 stream->deq buffer (variably sized)
deq buffer->decompress frames->uncompressed deq buffer (variably sized)
UDeqBuf->ring buf (fixed small size)
ring buf->output
so that's 4 buffers. the ring buffer is a non-allocating fixed size
buffer that sits between the uncompressed data and the audio
consumer. each buffer can be in it's own thread so the consumer can
fly it's merry way or not without hindering anything else. (keeping
in mind mutexing as appropriate)
te ring buffer only holds a couple seconds of data, and is kept full
by the UDeqBuf
if this is all crazy to you feel free if you got Q about it.
-dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden