I have an audio recorder app that I want to work similarly to the video recorder on the 3GS. When you start recording a video, it makes a small beep. When you pause the recording, it has a double beep.
I'm playing the beep and double-beep using AudioServicesPlaySystemSound()
and that works fine in and of itself. However, if I start my audio recording using AudioQueueStart()
, then the
AudioServicesPlaySystemSound()
doesn't play anything. I'm guessing the AudioQueueStart()
is grabbing control of the speakers, although it seems like it would only need the microphone input and not touch the speaker output.
I put my call to AudioServicesPlaySystemSound()
before the call to AudioQueueStart()
but that doesn't help. If I comment out the AudioQueueStart()
, then the sound plays fine.
Is there a conflict using both functions?
For the AudioQueue services, I'm setting
kAudioSessionProperty_AudioCategory
tokAudioSessionCategory_PlayAndRecord
-
kAudioSessionProperty_OverrideAudioRoute
tokAudioSessionOverrideAudioRoute_Speaker