Repository navigation
android: expose configured stereo mode on JavaAudioDeviceModule - #293
Open
kirill-jjj wants to merge 1 commit into
Open
kirill-jjj wants to merge 1 commit into
kirill-jjj wants to merge 1 commit into
Conversation
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.
Summary
JavaAudioDeviceModule.BuilderacceptssetUseStereoInput(boolean)/setUseStereoOutput(boolean), but the built module keeps the values only inprivate finalfields, so embedders cannot read back what the audio device module was configured to do. SDKs layered on top of it (e.g. publisher-side stereo configuration in LiveKit's Android SDK) currently cannot align their own state with the module configuration.Two getters on
JavaAudioDeviceModuleexpose the already-tracked configuration:useStereoInput()— returns whether the audio input is configured to capture stereouseStereoOutput()— returns whether the audio output is configured to play out stereoJava-only change: accessors over existing fields, no new imports, no behavior change. The same change targeting the
m144_releaseline is available as #294.Test plan
javacagainstandroid.jar(API 35) withsdk/android/api,sdk/android/src/java, andrtc_base/java/srcon the sourcepath andandroidx.annotation:annotation-jvmon the classpath: compiles with no errors, allJavaAudioDeviceModuleclasses emitted.