Hello. I have a problem with audio playback. I want the sound to be played
through the handset and not through the speakerphone.
I have a video terminal with a handset. I make an outgoing video call, and
when the call state switches to "Early media" the sound switches to the
speaker
2021-05-24 15: 29: 05.778 6266-6266/org.linphone.debug I/Linphone: [Audio
Manager] Turning on speakerphone
I have an API for my device that can switch the sound to handset, but the
sound switches later, after the event (onCallStateChanged) occurs.
I've tried specifying "route_audio_to_speaker_when_video_enabled = 0" in
the config
I also tried commenting out the code in the linphone-sdk that switches the
audio output to the speaker:
cd mediastreamer2
$ git diff
java/src/org/linphone/mediastream/MediastreamerAndroidContext.java
diff --git
a/java/src/org/linphone/mediastream/MediastreamerAndroidContext.java
b/java/src/org/linphone/mediastream/MediastreamerAndroidContext.java
index ff349cf9..a04ecae0 100644
--- a/java/src/org/linphone/mediastream/MediastreamerAndroidContext.java
+++ b/java/src/org/linphone/mediastream/MediastreamerAndroidContext.java
@@ -174,8 +174,8 @@ public class MediastreamerAndroidContext {
stopBluetooth();
}
- Log.i("[Audio Manager] Turning on speakerphone");
- audioManager.setSpeakerphoneOn(true);
+ Log.i("[Audio Manager] Do NOT turning on speakerphone");
+ audioManager.setSpeakerphoneOn(false);
}
public synchronized static void enableEarpiece() {
This method works.
Is it possible to make the sound always go to the handset and not switch to
the speaker without changing the code in linphone-sdk?
_______________________________________________
Linphone-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/linphone-users