AVCaptureSession for 6s模型的真实音频采样率是多少?

时间:2015-10-27 07:10:08

标签: ios audio

我将音频采样率设置为44.1k。

array(
 'employee' => array(
      'myprofile' => array(
        'default' => '0', 'personal' => '0', 'job' => '0', 'leave' => '0', 'permission' => '0', 'bonus & commision' => '0', 'document' => '0', 'emergency contact' => '0', 'benifits' => '0'
        ),
        'view emp' => array(
        'default' => '0', 'personal' => '0', 'job' => '0', 'leave' => '0', 'permission' => '0', 'bonus & commision' => '0', 'document' => '0', 'emergency contact' => '0', 'benifits' => '0', 'notes' => '0', 'onboard' => '0', 'offboard' => '0', 'charts' => '0'
        )
    )
)

这款打印48000适用于6s / 6s plus型号,44100适用于其他型号 在AVCaptureAudioDataOutputSampleBufferDelegate中:

AVAudioSession *audioSession = [AVAudioSession sharedInstance];

[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord
                                 withOptions:AVAudioSessionCategoryOptionMixWithOthers
                                       error:nil];

[audioSession setPreferredSampleRate:44100.0f error:nil];
[audioSession setPreferredOutputNumberOfChannels:1 error:nil];
//[audioSession setPreferredInputNumberOfChannels:2 error:nil];
[audioSession setPreferredIOBufferDuration:(1024.0f / 44100.0f) error:nil];
[audioSession setActive:YES error:nil];
NSLog(@"Audio session sampleRate = %f, outputNumberOfChannels = %d, duration = %f.", audioSession.sampleRate, audioSession.outputNumberOfChannels, audioSession.IOBufferDuration);

注意:但是样本总是44100引用inputformat,样本大小是1880,1882,2048。

实际采样率是多少? 44100或48000?

0 个答案:

没有答案