add error logs to audio session errors

This commit is contained in:
Benjamin Reis 2017-08-08 14:03:23 +02:00
parent aa3afc82b0
commit f4e56cfd34
2 changed files with 11 additions and 3 deletions

View file

@ -2630,6 +2630,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
// anymore (disconnected), so deactivate bluetooth.
if (err) {
_bluetoothEnabled = FALSE;
LOGE(@"Failed to enable bluetooth: err %@", err.localizedDescription);
} else {
_speakerEnabled = FALSE;
return;

View file

@ -50,12 +50,19 @@
}
- (void)configAudioSession:(AVAudioSession *)audioSession {
NSError *err;
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord
withOptions:AVAudioSessionCategoryOptionAllowBluetooth
error:nil];
[audioSession setMode:AVAudioSessionModeVoiceChat error:nil];
error:&err];
if (err)
LOGE(@"Unable to change audio category because : %@", err.localizedDescription);
[audioSession setMode:AVAudioSessionModeVoiceChat error:&err];
if (err)
LOGE(@"Unable to change audio mode because : %@", err.localizedDescription);
double sampleRate = 44100.0;
[audioSession setPreferredSampleRate:sampleRate error:nil];
[audioSession setPreferredSampleRate:sampleRate error:&err];
if (err)
LOGE(@"Unable to change preferred sample rate because : %@", err.localizedDescription);
}
- (void)reportIncomingCallwithUUID:(NSUUID *)uuid handle:(NSString *)handle video:(BOOL)video {