mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-20 06:38:25 +00:00
Switch from a hardware AEC whitelist back to a blacklist
Disabling OpenSL ES seems to make the hardware AEC "work" on devices where it was previously causing problems. Using the WebRTC-based software AEC *without* OpenSL ES seems to be causing new problems. Fixes #6737 Related #6432 Related #6241 // FREEBIE
This commit is contained in:
parent
7c2191f9a0
commit
1c8077a7fe
@ -178,26 +178,22 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initializeWebRtc() {
|
private void initializeWebRtc() {
|
||||||
Set<String> HARDWARE_AEC_WHITELIST = new HashSet<String>() {{
|
Set<String> HARDWARE_AEC_BLACKLIST = new HashSet<String>() {{
|
||||||
add("D5803");
|
add("Pixel");
|
||||||
add("FP1");
|
add("Pixel XL");
|
||||||
add("SM-A500FU");
|
|
||||||
add("XT1092");
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
Set<String> OPEN_SL_ES_WHITELIST = new HashSet<String>() {{
|
Set<String> OPEN_SL_ES_WHITELIST = new HashSet<String>() {{
|
||||||
|
add("Pixel");
|
||||||
|
add("Pixel XL");
|
||||||
}};
|
}};
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 11) {
|
if (Build.VERSION.SDK_INT >= 11) {
|
||||||
if (HARDWARE_AEC_WHITELIST.contains(Build.MODEL)) {
|
if (HARDWARE_AEC_BLACKLIST.contains(Build.MODEL)) {
|
||||||
WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(false);
|
|
||||||
} else {
|
|
||||||
WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true);
|
WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OPEN_SL_ES_WHITELIST.contains(Build.MODEL)) {
|
if (!OPEN_SL_ES_WHITELIST.contains(Build.MODEL)) {
|
||||||
WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(false);
|
|
||||||
} else {
|
|
||||||
WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(true);
|
WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user