Reputation: 67
My App is utilizing the AudioUnit
functionality to produce short sounds for a metronome application.
All is running fine.
Now I want to play an MP3 from the iTunes Lib on the Device and I use MPMusicPlayerController
for it.
No probs until here, the MP3 plays fine. But afterwards I can never again invoke my AudioUnit
sounds again. I debugged it that far that the callback for the Audio buffers never ever appears again so I think the AUGraph
has been stopped but it signals that it is still running.
Anyone having an idea? Did the MPMusicPlayerController
just stop the Graph? And how to prevent that?
Thanks for any hint, Andreas
Upvotes: 2
Views: 707
Reputation: 1653
From this doc, "Music players (instances of the MPMusicPlayerController class) always use a system-supplied audio session." Your application can't access system-supplied audio sessions as far as I know. Therefore, it's not possible for MPMusicPlayerController audio and your app audio to be played simultaneously.
In order to play an MP3 from the iPod library and your metronome simultaneously, do the following:
Upvotes: 2