Skip to content

Commit

Permalink
fix: Fix can't open mic alone when built-in AEC is enabled. (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Jan 18, 2023
1 parent d4ff918 commit c88fe70
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions audio/audio_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ void AudioState::AddSendingStream(webrtc::AudioSendStream* stream,
if (!adm->Recording()) {
if (adm->InitRecording() == 0) {
if (recording_enabled_) {
#if defined(WEBRTC_WIN)
if (adm->BuiltInAECIsAvailable() && !adm->Playing()) {
if (!adm->PlayoutIsInitialized()) {
adm->InitPlayout();
}
adm->StartPlayout();
}
#endif
adm->StartRecording();
}
} else {
Expand Down

0 comments on commit c88fe70

Please sign in to comment.