I am looking at the HFP in iOS.
If I use code as follows (yes I am aware this was deprecated at iOS7), audio played via the bluetooth is at an 8000 sample rate.
UInt32 audioCategory = kAudioSessionCategory_PlayAndRecord;
AudioSessionSetProperty (kAudioSessionProperty_AudioCategory, sizeof (audioCategory), &audioCategory);
UInt32 allowBluetoothInput = 1;
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryEnableBluetoothInput, sizeof(allowBluetoothInput), &allowBluetoothInput);
Is there any way when using the HFP to force a sample rate of 44100? I have looked at the following but this didn't change it.
Float64 preferredSampleRate = 44100.0;
AudioSessionSetProperty(kAudioSessionProperty_PreferredHardwareSampleRate, sizeof(preferredSampleRate), &preferredSampleRate);
Is there anyway to override this? It appears that the output sample rate is being reduced to the input sample rate of 8000.
Thanks.