AVAudioPlayer interferes Output Audiounit on Simulator ?
AVAudioPlayer interferes Output Audiounit on Simulator ?
- Subject: AVAudioPlayer interferes Output Audiounit on Simulator ?
- From: "Zhiye (Sterling) Li" <email@hidden>
- Date: Thu, 8 Oct 2009 23:59:21 -0500
Hi All,
I got this strange problem. I have an AVAudioPlayer and an Output AudioUnit in the same project. The audiounit is set up at the beginning of the program and the AVAudioPlayer is inited whenever it's needed. They both work perfectly, but When I use AVAudioPlayer to play a sound first, and stop it or let it play to the end, and then use the output audiounit to play a sound, the audiounit will not work any more! The recording and playback rendering callback do not even get called. However, if I do
[player pause] (player is an instance of AVAudioplayer) instead of
[player stop], it will not affect the audiounit. In other words, whenever
[player stop] happens or the player reaches the end of the sound, the audiounit will stop working afterwards.
I tried to reset the audio session category after the [player stop], and even reset the entire audiounit, but the audiounit still did not respond. Another strange thing is that on iPhone this problem disappears.
So, can anybody give me a clue what might have happened? Thank you in advance!
Best,
Zhiye
_______________________________________________
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