mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-01 18:06:24 +00:00
add error logs to audio session errors
This commit is contained in:
parent
aa3afc82b0
commit
f4e56cfd34
2 changed files with 11 additions and 3 deletions
|
|
@ -2630,6 +2630,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
|
||||||
// anymore (disconnected), so deactivate bluetooth.
|
// anymore (disconnected), so deactivate bluetooth.
|
||||||
if (err) {
|
if (err) {
|
||||||
_bluetoothEnabled = FALSE;
|
_bluetoothEnabled = FALSE;
|
||||||
|
LOGE(@"Failed to enable bluetooth: err %@", err.localizedDescription);
|
||||||
} else {
|
} else {
|
||||||
_speakerEnabled = FALSE;
|
_speakerEnabled = FALSE;
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)configAudioSession:(AVAudioSession *)audioSession {
|
- (void)configAudioSession:(AVAudioSession *)audioSession {
|
||||||
|
NSError *err;
|
||||||
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord
|
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord
|
||||||
withOptions:AVAudioSessionCategoryOptionAllowBluetooth
|
withOptions:AVAudioSessionCategoryOptionAllowBluetooth
|
||||||
error:nil];
|
error:&err];
|
||||||
[audioSession setMode:AVAudioSessionModeVoiceChat error:nil];
|
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;
|
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 {
|
- (void)reportIncomingCallwithUUID:(NSUUID *)uuid handle:(NSString *)handle video:(BOOL)video {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue