Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 2ce4105

Browse files
小田喜陽彦小田喜陽彦
authored andcommitted
Fix audio unit initialization condition in AudioDeviceIOS::UpdateAudioUnit
1 parent 2c9eb5a commit 2ce4105

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/objc/native/src/audio/audio_device_ios.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ static void LogDeviceInfo() {
816816
// be initialized on initialization.
817817
if (!audio_is_initialized_) return;
818818

819-
if (!audio_unit_ && !CreateAudioUnit()) {
819+
if (can_play_or_record && !audio_unit_ && !CreateAudioUnit()) {
820820
RTCLog(@"Failed to create audio unit.");
821821
return;
822822
}

0 commit comments

Comments
 (0)