Skip to content
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

AVAudioEngine version AudioDeviceModule #536

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

hiroshihorie
Copy link
Member

@hiroshihorie hiroshihorie commented Jan 6, 2025

Using lib from webrtc-sdk/webrtc#158.
macOS will still use previous implementation at the moment. (Device selection etc not implemented yet)

New features

Advanced other audio ducking
Lower audio from other apps dynamically when voice activity is detected.

Muted talker detection
Detect voice activity even mic is off after calling AudioManager.shared.prepareRecording().

Provide custom AVAudioNode configuration for input and output through onEngineWillConnectInput and onEngineWillConnectOutput handlers.

Early recording initialization with AudioManager.shared.prepareRecording() without mic indicator turning on.

Early mic input buffer capturing with AudioManager.shared.startLocalRecording() without the need for Room and connection.

Improvements

Correct mic muting logic without the requirement of restarting whole audio unit (previous implementation).

Correct audio session configuration timing. AudioDeviceModule requests configuration when it's required, instead of counting tracks and configuring it in advance (previous implementation).

@hiroshihorie hiroshihorie mentioned this pull request Jan 6, 2025
1 task
@hiroshihorie hiroshihorie marked this pull request as ready for review January 14, 2025 06:14
@bcherry bcherry self-requested a review January 14, 2025 07:19
Copy link
Contributor

@bcherry bcherry left a comment

Choose a reason for hiding this comment

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

this looks good. i understand most of the guts of the change are really in webrtc-sdk/webrtc#158 - what's the process for getting that merged in so we can use it? Or are we comfortable shipping our SDK with the exp4 version for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants