0

我正在使用 AVCaptureAudioDataOutput 进行音频输出并获取结果表单

          - (void)captureOutput:(AVCaptureOutput *)captureOutputdidOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
   fromConnection:(AVCaptureConnection *)connection

但我想更改 sampleBuffer 音频格式(CMSampleBufferGetFormatDescription)。如果可能,请帮助我。想要更改 mSampleRate 。

Currently getting
mediaSpecific: {ASBD: {mSampleRate: 44100.000000mFormatID: 'lpcm'mFormatFlags: 0xcmBytesPerPacket: 2mFramesPerPacket: 1mBytesPerFrame: 2mChannelsPerFrame: 1mBitsPerChannel: 16 }

但我需要将 mSampleRate 44100.000000 更改为 8000.000000。

4

1 回答 1

0

看看这里:http: //developer.apple.com/library/ios/#DOCUMENTATION/AVFoundation/Reference/AVFoundationAudioSettings_Constants/Reference/reference.html#//apple_ref/doc/uid/TP40009937

您必须设置 AVAudioRecorder。

希望,这有帮助!

于 2012-06-28T09:59:49.320 回答