IOS iPod music rendering

I want to apply rendering to iPod audio playing from an iPhone user's music library and to pass the music stream on to the iPhone speakers or other selected output.

I have experimented with code from a wide number of examples and tutorials, including: Apple's Core Audio documentation, MixerHost, //tomplaskon.wordpress.com/2011/08/10/how-to-add-a-render-callback-to-remoteio-after-a-mixer-in-ios/, //timbolstad.com/2010/03/14/core-audio-getting-started/, //atastypixel.com/blog/using-remoteio-audio-unit/, //atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/, //sleepyleaf.com/ Demetri Miller's PitchDetector app, and many more. I have poured over questions and answers in Stack Overflow.

I can successfully create apps using audio graphs including mixers and applying effects, create callbacks, render music from individual songs or input from the microphone, but I have not figured out how to access the iPod music stream.

I want to apply FFT to the music stream for further analysis and to pass the music through to the output without further modification--no effects changing the audio stream--just a pass through, if that matters. I want the FFT rendering to occur when the iPod music player is playing and stop when the player stops, i.e., the iPod controls when the rendering occurs.

The Apple AddMusic example mixes an audio stream with an iPod music stream, but I could not see that the iPod music was exposed in any way that provided a means to extract the iPod music data for rendering.

Jeroen van Rijn's //mobile.tutsplus.com/tutorials/iphone/ios-sdk-music-library-access/ is an example Music Player app that plays iPod music that can be controlled by either the Music Player app or the iPhone iPod app. That app or the iPod app selects one or more songs and plays them to the iPhone speakers. I can get callbacks to execute in that app up to the AudioUnitRender method, but the callback audio buffers are empty. I can not figure out the approach needed to populate the buffers with audio data for the AudioUnitRender to function.

My rather vague question is "how to access the music stream played by the Music Player/iPod and process that music stream by a render callback"? After rendering, I want to pass the music on to the speakers or other selected output device. What is the approach for accessing the music data? Audio Units and Audio Graphs, or iPodAssetReader, or some other approach? Circular buffers seem to be an approach for processing a continuous stream of music but I do not know the specific location where/how to access the iPod music data stream to pass to the callback.

Thanks in advance.
IOS iPod music rendering
===


I want to apply rendering to iPod audio playing from an iPhone user's music library and to pass the music stream on to the iPhone speakers or other selected output.

I have experimented with code from a wide number of examples and tutorials, including: Apple's Core Audio documentation, MixerHost, //tomplaskon.wordpress.com/2011/08/10/how-to-add-a-render-callback-to-remoteio-after-a-mixer-in-ios/, //timbolstad.com/2010/03/14/core-audio-getting-started/, //atastypixel.com/blog/using-remoteio-audio-unit/, //atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/, //sleepyleaf.com/ Demetri Miller's PitchDetector app, and many more. I have poured over questions and answers in Stack Overflow.

I can successfully create apps using audio graphs including mixers and applying effects, create callbacks, render music from individual songs or input from the microphone, but I have not figured out how to access the iPod music stream.

I want to apply FFT to the music stream for further analysis and to pass the music through to the output without further modification--no effects changing the audio stream--just a pass through, if that matters. I want the FFT rendering to occur when the iPod music player is playing and stop when the player stops, i.e., the iPod controls when the rendering occurs.

The Apple AddMusic example mixes an audio stream with an iPod music stream, but I could not see that the iPod music was exposed in any way that provided a means to extract the iPod music data for rendering.

Jeroen van Rijn's //mobile.tutsplus.com/tutorials/iphone/ios-sdk-music-library-access/ is an example Music Player app that plays iPod music that can be controlled by either the Music Player app or the iPhone iPod app. That app or the iPod app selects one or more songs and plays them to the iPhone speakers. I can get callbacks to execute in that app up to the AudioUnitRender method, but the callback audio buffers are empty. I can not figure out the approach needed to populate the buffers with audio data for the AudioUnitRender to function.

My rather vague question is "how to access the music stream played by the Music Player/iPod and process that music stream by a render callback"? After rendering, I want to pass the music on to the speakers or other selected output device. What is the approach for accessing the music data? Audio Units and Audio Graphs, or iPodAssetReader, or some other approach? Circular buffers seem to be an approach for processing a continuous stream of music but I do not know the specific location where/how to access the iPod music data stream to pass to the callback.

Thanks in advance.