我正在做一个需要几乎实时(我们可以忍受一些核心音频延迟)音频监控的项目,从蓝牙麦克风到 iPhone 的默认设置
我都试过了:
UInt32 allowBluetoothInput = 1;
OSStatus stat = AudioSessionSetProperty (kAudioSessionProperty_OverrideCategoryEnableBluetoothInput, sizeof (allowBluetoothInput), &allowBluetoothInput);
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
stat= AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute, sizeof (audioRouteOverride), &audioRouteOverride);
和
UInt32 overrideAudioRoute = kAudioSessionOverrideAudioRoute_None;
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute, sizeof (overrideAudioRoute), &overrideAudioRoute);
UInt32 doChangeDefaultRoute = 1;
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryDefaultToSpeaker, sizeof(doChangeDefaultRoute), &doChangeDefaultRoute);
但都没有产生正确的行为
我可以设置任何属性来使其正常工作吗?