我正在看iOS中的HFP。
如果我按如下方式使用代码(是的,我知道在iOS7上已弃用),通过蓝牙播放的音频采样率为8000。
UInt32 audioCategory = kAudioSessionCategory_PlayAndRecord;
AudioSessionSetProperty (kAudioSessionProperty_AudioCategory, sizeof (audioCategory), &audioCategory);
UInt32 allowBluetoothInput = 1;
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryEnableBluetoothInput, sizeof(allowBluetoothInput), &allowBluetoothInput);
使用HFP强制采样率为44100时有什么办法吗?我看过以下内容,但这并没有改变它。
Float64 preferredSampleRate = 44100.0;
AudioSessionSetProperty(kAudioSessionProperty_PreferredHardwareSampleRate, sizeof(preferredSampleRate), &preferredSampleRate);
无论如何都要覆盖这个?似乎输出采样率降低到8000的输入采样率。
感谢。
答案 0 :(得分:2)
HFP支持采用CVSD编解码器的8kHz采样率。从HFP 1.6开始,它使用mSBC编解码器支持16kHz“宽带语音”。我不确定是否可以覆盖率,因为它是在免提设备和音频网关(iPhone)之间协商的。