Skip to content

AVAudioEngine version AudioDeviceModule #536

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
merged 54 commits into from
Jan 30, 2025
Merged

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?

@peng2219
Copy link

Hi, @hiroshihorie , sorry but waiting for this fix for very long time. Thanks for your effort.

@hiroshihorie hiroshihorie requested a review from bcherry January 29, 2025 17:20
@hiroshihorie
Copy link
Member Author

@bcherry Feels pretty stable now I think I'll merge it .

commit facb3ce
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jan 23 23:20:43 2025 +0900

    Move debug string

commit 81afdd1
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jan 23 23:12:19 2025 +0900

    Revert "temp use local lib"

    This reverts commit b1b79d2.

commit c978bd3
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jan 23 23:12:04 2025 +0900

    Tests

commit b1b79d2
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jan 23 17:15:23 2025 +0900

    temp use local lib
@hiroshihorie hiroshihorie merged commit a489ddb into main Jan 30, 2025
10 of 12 checks passed
@hiroshihorie hiroshihorie deleted the hiroshi/adm-audioengine2 branch January 30, 2025 16:43
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.

3 participants