8000 update. · flutter-webrtc/flutter-webrtc@2353795 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2353795

Browse files
committed
update.
1 parent 88f85fb commit 2353795

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

android/src/main/java/com/cloudwebrtc/webrtc/MethodCallHandlerImpl.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,11 @@ private void initialize(boolean bypassVoiceProcessing, int networkIgnoreMask, bo
207207
.setUseStereoOutput(true)
208208
.setAudioSource(MediaRecorder.AudioSource.MIC);
209209
} else {
210-
audioDeviceModuleBuilder.setUseHardwareAcousticEchoCanceler(true)
211-
.setUseLowLatency(true)
212-
.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION)
213-
.setUseHardwareNoiseSuppressor(true);
210+
boolean useHardwareAudioProcessing = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q;
211+
boolean useLowLatency = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
212+
audioDeviceModuleBuilder.setUseHardwareAcousticEchoCanceler(useHardwareAudioProcessing)
213+
.setUseLowLatency(useLowLatency)
214+
.setUseHardwareNoiseSuppressor(useHardwareAudioProcessing);
214215
}
215216

216217
audioDeviceModuleBuilder.setSamplesReadyCallback(recordSamplesReadyCallbackAdapter);

0 commit comments

Comments
 (0)
0