Add audioManagerMode and setSpeakerphoneOn support in record_android to fix Echo Cancellation on Samsung S20#454
Closed
keyur2maru wants to merge 2 commits intollfbandit:masterfrom
keyur2maru:master
Closed
Add audioManagerMode and setSpeakerphoneOn support in record_android to fix Echo Cancellation on Samsung S20#454keyur2maru wants to merge 2 commits intollfbandit:masterfrom keyur2maru:master
keyur2maru wants to merge 2 commits intollfbandit:masterfrom
keyur2maru:master
Conversation
…ing speakerphone - Introduced `audioManagerMode` in `MethodCallHandlerImpl` to map configuration values to `AudioManager` modes. - Updated `RecordConfig` to include new parameters: - `audioManagerMode` (default: `MODE_NORMAL`). - `setSpeakerphoneOn` (default: `false`). - Modified `AudioRecorder` to: - Configure `AudioManager` mode during initialization if `audioManagerMode` is specified. - Enable speakerphone if `setSpeakerphoneOn` is `true`. - Updated Dart `AndroidRecordConfig`: - Added `audioManagerMode` with an enum for supported modes. - Added `setSpeakerphoneOn` for controlling speakerphone behavior. - Updated `toMap` method to serialize new properties. Reason for changes: - Switching `AudioManager` modes (e.g., to `MODE_IN_COMMUNICATION`) helps address acoustic echo cancellation issues, particularly on devices like the Samsung S20. - Enabling the speakerphone is useful for scenarios where external playback is needed or for devices with echo issues in recording. - These additions provide greater flexibility for managing audio configurations, improving compatibility across a broader range of devices. Signed-off-by: Keyur Maru <[email protected]>
- Updated `record_android` to v1.3.1 in `pubspec.yaml`. - Includes support for `audioManagerMode` and `setSpeakerphoneOn` for improved echo cancellation and external playback scenarios. Signed-off-by: Keyur Maru <[email protected]>
|
This PR solved my problem. I think it would be better to merge. |
Owner
|
Closing this PR in favor of a24931a. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
record_androidto version1.3.1.audioManagerModeto configureAudioManagermodes to fix echo cancellation issues on some Android devices (verified on Samsung S20).setSpeakerphoneOnoption to enable speakerphone, addressing echo issues and external playback needs.pubspec.yamlto referencerecord_androidversion1.3.1.AndroidRecordConfigin Dart to support the new options.These changes enhance recording capabilities by improving echo cancellation compatibility across devices, with specific testing on the Samsung S20.