Committed by
GitHub
Use audio source VOICE_COMMUNICATION for echo cancelling (#351)
* Use audio source VOICE_COMMUNICATION for echo cancelling * Spotless
正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
| 1 | /* | 1 | /* |
| 2 | - * Copyright 2023 LiveKit, Inc. | 2 | + * Copyright 2023-2024 LiveKit, Inc. |
| 3 | * | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
| @@ -164,7 +164,8 @@ object RTCModule { | @@ -164,7 +164,8 @@ object RTCModule { | ||
| 164 | .setAudioTrackErrorCallback(audioTrackErrorCallback) | 164 | .setAudioTrackErrorCallback(audioTrackErrorCallback) |
| 165 | .setAudioRecordStateCallback(audioRecordStateCallback) | 165 | .setAudioRecordStateCallback(audioRecordStateCallback) |
| 166 | .setAudioTrackStateCallback(audioTrackStateCallback) | 166 | .setAudioTrackStateCallback(audioTrackStateCallback) |
| 167 | - .setAudioSource(MediaRecorder.AudioSource.DEFAULT) | 167 | + // VOICE_COMMUNICATION needs to be used for echo cancelling. |
| 168 | + .setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION) | ||
| 168 | .setAudioAttributes(audioOutputAttributes) | 169 | .setAudioAttributes(audioOutputAttributes) |
| 169 | 170 | ||
| 170 | moduleCustomizer?.invoke(builder) | 171 | moduleCustomizer?.invoke(builder) |
-
请 注册 或 登录 后发表评论