File tree Expand file tree Collapse file tree
APIExample-Audio/APIExample-Audio/Examples/Advanced/CustomAudioRender
APIExample/APIExample/Examples/Advanced
macOS/APIExample/Examples/Advanced/CustomAudioRender
windows/APIExample/APIExample/Advanced/CrossChannel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ class CustomAudioRenderMain: BaseViewController {
7171 // Set audio route to speaker
7272 agoraKit. setDefaultAudioRouteToSpeakerphone ( true )
7373
74+ // It is necessary to use publishMicrophoneTrack(true) and pullPlaybackAudio should utilize gameStreaming.
75+ agoraKit. setAudioScenario ( . gameStreaming)
76+
7477 // important!! this example is using onPlaybackAudioFrame to do custom rendering
7578 // by default the audio output will still be processed by SDK hence below api call is mandatory to disable that behavior
7679// agoraKit.adjustPlaybackSignalVolume(0)
@@ -88,7 +91,7 @@ class CustomAudioRenderMain: BaseViewController {
8891 // the token has to match the ones used for channel join
8992 let option = AgoraRtcChannelMediaOptions ( )
9093 option. publishCameraTrack = false
91- option. publishMicrophoneTrack = false
94+ option. publishMicrophoneTrack = true
9295 option. autoSubscribeAudio = true
9396 option. autoSubscribeVideo = false
9497 option. channelProfile = . liveBroadcasting
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ class CustomAudioRenderMain: BaseViewController {
7171 agoraKit. enableAudio ( )
7272 // Set audio route to speaker
7373 agoraKit. setDefaultAudioRouteToSpeakerphone ( true )
74+ // It is necessary to use publishMicrophoneTrack(true) and pullPlaybackAudio should utilize gameStreaming.
75+ agoraKit. setAudioScenario ( . gameStreaming)
7476
7577 // start joining channel
7678 // 1. Users can only see each other after they join the
@@ -80,7 +82,7 @@ class CustomAudioRenderMain: BaseViewController {
8082 // the token has to match the ones used for channel join
8183 let option = AgoraRtcChannelMediaOptions ( )
8284 option. publishCameraTrack = false
83- option. publishMicrophoneTrack = false
85+ option. publishMicrophoneTrack = true
8486 option. autoSubscribeAudio = true
8587 option. autoSubscribeVideo = false
8688 option. channelProfile = . liveBroadcasting
Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ class TransparentRenderViewController: BaseViewController {
9595 setupLocalAlphaCavans ( )
9696 }
9797
98- override func viewDidDisappear( _ animated: Bool ) {
98+
99+ override func viewWillDisappear( _ animated: Bool ) {
100+ super. viewWillDisappear ( animated)
101+ agoraKit. destroyMediaPlayer ( mediaPlayer)
99102 agoraKit. leaveChannel ( )
100103 agoraKit. disableVideo ( )
101104 agoraKit. stopPreview ( )
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ void CAgoraCrossChannelDlg::ResumeStatus()
166166{
167167 InitCtrlText ();
168168 m_lstInfo.ResetContent ();
169+ m_cmbCrossChannelList.ResetContent ();
169170 m_staDetails.SetWindowText (_T (" " ));
170171 m_edtChannel.SetWindowText (_T (" " ));
171172 m_edtCrossChannel.SetWindowText (_T (" " ));
You can’t perform that action at this time.
0 commit comments