Skip to content

Commit 5aca1d4

Browse files
committed
Merge branch 'refs/heads/dev/4.5.0' into dev/4.5.0_android
2 parents 5cfd8df + 037c4d2 commit 5aca1d4

5 files changed

Lines changed: 15 additions & 5 deletions

File tree

iOS/APIExample-Audio/APIExample-Audio/Examples/Advanced/CustomAudioRender/CustomAudioRender.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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

iOS/APIExample/APIExample/Examples/Advanced/CustomAudioRender/CustomAudioRender.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

iOS/APIExample/APIExample/Examples/Advanced/TransparentRender/TransparentRender.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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()

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

windows/APIExample/APIExample/Advanced/CrossChannel/CAgoraCrossChannelDlg.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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(""));

0 commit comments

Comments
 (0)