audio - Playback MP3 using RemoteIO and AudioUnits on iPhone... possible? -


I want to playback mp3 instead of an uncompressed file using Remoteo / AudioUnit. Using uncompressed files clearly uses too much disk space (30 MB vs 3 MB for MP3).

Is this possible? If so, can you provide a slight code headstart?

Thanks a million.

Yes, this is possible. But it requires many audio API usage and many threads.

Due to the real-time barriers to audio unit buffer callback thread, call back you must convert compressed files for PCM samples outside the audio unit. You can use the extended audio file service or AVSet reader to convert the uncompressed samples out of the audio unit callback. However, you do not need to uncompress the entire file at once. The fraction of each other is likely to have a small uncompressed buffer, as long as you keep it ahead of the audio unit callback buffer consumption rate. It can be done in a separate timer driven thread that monitors buffer consumption, and accordingly uncompresses enough audio, perhaps in a ring buffer or circular fifa.

Will you end a rewrite audio queue API layer, but with more customization?


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -