• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Thoughts/ideas on decompressing parts of an MP3 stream
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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

  • Prev by Date: Thoughts/ideas on decompressing parts of an MP3 stream
  • Next by Date: Re: Coreaudio-api Digest, Vol 4, Issue 70
  • Previous by thread: Thoughts/ideas on decompressing parts of an MP3 stream
  • Next by thread: Re: Coreaudio-api Digest, Vol 4, Issue 70
  • Index(es):
    • Date
    • Thread