Question

I am using AVCaptureSession to record video and audio into sample buffers using AVCaptureVideoDataOutput and AVCaptureAudioDataOutput.

The default audio sample rate for the iPhone (4 and 4S) is 44100Hz. I would like to set this to 48000Hz however AVCaptureSession does not seem to have any settings for audio sample rate.

I have tried to use AVAudioSession to change the hardware sample rate (using setPreferredHardwareSampleRate) but though it reports the hardware sample rate as changed (after activating the session) this does not affect the actual rate of samples I'm getting in AVCaptureAudioDataOutput's sample delegate.

Is there any way to set the audio sample rate from within AVCaptureSession itself?

Was it helpful?

Solution

Per Apple support, there is no way to do this in iOS 5. They suggest this feature might be added in a later version, maybe even 6.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top