开发者

Is it possible to access decoded audio data from Audio Queue Services?

I have an app in the App Store for streaming compressed music files over the network. I'm using Audio Queue Services to handle the playback of the files.

I would like to do some processing on the files as they are streamed. I tested the data in the audio buffers, but it is not decompressed audio. If I'm streaming an mp3 file, the buffers are just little slices of mp3 data.

My question is: is it ever possi开发者_如何学Goble to access the uncompressed PCM data when using Audio Queue Services? Am I forced to switch to using Audio Units?


You could use Audio Conversion Services to do your own MP3-to-PCM conversion, apply your effect, then put PCM into the queue instead of MP3. It's not going to be terribly easy, but you'd still be saved the threading challenges of doing this directly with audio units (which would require you to do your own conversion anyways and then probably use a CARingBuffer to send samples between the download/convert thread and the realtime callback thread from the IO unit)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜