Skip to content

Commit d963b5d

Browse files
committed
fix: custom audio render audio scenario changed for mac
1 parent 9977bc0 commit d963b5d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

macOS/APIExample/Examples/Advanced/CustomAudioRender/CustomAudioRender.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ class CustomAudioRender: BaseViewController {
172172
// set live broadcaster mode
173173
agoraKit.setChannelProfile(.liveBroadcasting)
174174

175-
175+
// It is necessary to use publishMicrophoneTrack(true) and pullPlaybackAudio should utilize gameStreaming.
176+
agoraKit.setAudioScenario(.gameStreaming)
176177

177178
// start joining channel
178179
// 1. Users can only see each other after they join the
@@ -183,7 +184,7 @@ class CustomAudioRender: BaseViewController {
183184
isProcessing = true
184185
let option = AgoraRtcChannelMediaOptions()
185186
option.publishCameraTrack = false
186-
option.publishMicrophoneTrack = false
187+
option.publishMicrophoneTrack = true
187188
option.autoSubscribeAudio = true
188189
option.autoSubscribeVideo = false
189190
option.channelProfile = .liveBroadcasting

0 commit comments

Comments
 (0)