0
0

Hello,

I am working on an app that takes advantage of the video recorder of the iPhone 3GS, which is called by the UIImagePickerController with a mediaType of kUTTypeMovie and a sourceType of UIImagePickerControllerSourceTypeCamera (this basically makes the video camera come up instead of an image picker).

I would like to play a sound during the camera record. If I just have the picture picker or a picture camera, there is sound that plays throughout. But if I use the video camera, the sound starts, but fades out as the camera opens.

I started with just plain using AVAudioPlayer and experimenting with AudioSessions, but nothing gave me the required results. I then tried FMOD, but got the same results. So I’m thinking it is something within the UIImagePickerController that is silencing it.

My question for you, do you know of any way around this? Thanks!

  • George
  • You must to post comments
0
0

I would suggest linking with the logging version of FMOD. Look at the TTY output, if you see a message saying that FMOD output has stopped due to interruption then unfortunately there is nothing you can do.

The interruption API allows other application to take over control of the audio, if the movie camera is doing this then we can’t trump it. All that remains is log a feature request on the Apple bug tracker requesting audio mixing being allowed while recording movies.

  • You must to post comments
0
0

Thanks Mathew,

I’ll give that a look and post up what I find. Hopefully there will be a message (what could I do if there’s no message?). I’ll also try to see if perhaps starting the audio after popping up the video recorder will do anything.

  • George
  • You must to post comments
0
0

Hello,

I do get the interrupt message. When the camera loads, I get:

FMOD: OutputCoreAudio::handleInterruption : Audio has been interrupted by an external event… stopping output.
FMOD: OutputCoreAudio::handleRouteChange : Audio route has change from ‘Speaker’ to ‘Speaker’ (Reason 4).

And then, when the camera quits, I get:

FMOD: OutputCoreAudio::handleRouteChange : Audio route has change from ‘SpeakerAndMicrophone’ to ‘Speaker’ (Reason 3).
FMOD: OutputCoreAudio::handleInterruption : External audio interruption has been resolved… restarting output.

I’m still investigating…

  • George
  • You must to post comments
0
0

Yeah that is usual behaviour for when an interruption happens, this is the same as when a phone call comes in. Unless Apple change the behaviour of their movie recorder we can’t prevent this from happening.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.