Skip to content

Commit

Permalink
Fix audio unit initialization condition in AudioDeviceIOS::UpdateAudi…
Browse files Browse the repository at this point in the history
…oUnit
  • Loading branch information
小田喜陽彦 authored and 小田喜陽彦 committed Nov 29, 2019
1 parent 2c9eb5a commit 2ce4105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/objc/native/src/audio/audio_device_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ static void LogDeviceInfo() {
// be initialized on initialization.
if (!audio_is_initialized_) return;

if (!audio_unit_ && !CreateAudioUnit()) {
if (can_play_or_record && !audio_unit_ && !CreateAudioUnit()) {
RTCLog(@"Failed to create audio unit.");
return;
}
Expand Down

0 comments on commit 2ce4105

Please sign in to comment.