Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thoughts/ideas on decompressing parts of an MP3 stream



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:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden
References: 
 >Thoughts/ideas on decompressing parts of an MP3 stream (From: Mattias Arrelid <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.