8000 [Android] fix: remove setPreferredInputDevice when getUserAduio. by cloudwebrtc · Pull Request #1808 · flutter-webrtc/flutter-webrtc · GitHub
[go: up one dir, main page]

Skip to content

[Android] fix: remove setPreferredInputDevice when getUserAduio. #1808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

cloudwebrtc
Copy link
Member
@cloudwebrtc cloudwebrtc commented Apr 3, 2025

Calling setPreferredInputDevice will cause HW AEC/NS failure on some devices, causing echo during voice calls. Known devices include Galaxy S25 Ultra, Galaxy Z Fold6.

In addition, we should avoid using Helper.selectAudioInput during a call to avoid causing echo cancellation failure on these devices.

@cloudwebrtc cloudwebrtc changed the title fix: remove setPreferredInputDevice when getUserAduio. [Android] fix: remove setPreferredInputDevice when getUserAduio. Apr 3, 2025
@cloudwebrtc cloudwebrtc added 🐛bug Something isn't working 🤖Android labels Apr 3, 2025
@cloudwebrtc cloudwebrtc requested a review from Copilot April 3, 2025 01:08
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the call to setPreferredInputDevice from the getUserAudio method to address hardware AEC/NS issues on specific Android devices during voice calls.

  • Removed the setPreferredInputDevice block to avoid echo cancellation problems on Galaxy S25 Ultra and Galaxy Z Fold6.
  • Simplified the audio track creation flow by eliminating unnecessary device-specific configuration.
Comments suppressed due to low confidence (1)

android/src/main/java/com/cloudwebrtc/webrtc/GetUserMediaImpl.java:365

  • [nitpick] Since setPreferredInputDevice has been removed, consider reviewing the usage of deviceId. If it is no longer required in getUserAudio, removing it from the method's parameters could help clean up the code.
if (deviceId != null) { ... } // block removed

@cloudwebrtc cloudwebrtc merged commit 676d9e4 into main Apr 3, 2025
8 checks passed
@cloudwebrtc cloudwebrtc deleted the fix/remove-set-perferred-input-device-when-get-user-audio branch April 3, 2025 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖Android 🐛bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0