@@ -67,6 +67,12 @@ BEGIN_MESSAGE_MAP(CAgoraEffectDlg, CDialogEx)
67
67
ON_BN_CLICKED(IDC_BUTTON_STOP_ALL_EFFECT2, &CAgoraEffectDlg::OnBnClickedButtonStopAllEffect2)
68
68
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_AGIN, &CAgoraEffectDlg::OnDeltaposSpinGain)
69
69
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_PITCH, &CAgoraEffectDlg::OnDeltaposSpinPitch)
70
+ ON_MESSAGE(WM_MSGID(EID_JOINCHANNEL_SUCCESS), &CAgoraEffectDlg::OnEIDJoinChannelSuccess)
71
+ ON_MESSAGE(WM_MSGID(EID_LEAVE_CHANNEL), &CAgoraEffectDlg::OnEIDLeaveChannel)
72
+ ON_MESSAGE(WM_MSGID(EID_USER_JOINED), &CAgoraEffectDlg::OnEIDUserJoined)
73
+ ON_MESSAGE(WM_MSGID(EID_USER_OFFLINE), &CAgoraEffectDlg::OnEIDUserOffline)
74
+ ON_MESSAGE(WM_MSGID(EID_REMOTE_VIDEO_STATE_CHANED), &CAgoraEffectDlg::OnEIDRemoteVideoStateChanged)
75
+
70
76
ON_LBN_SELCHANGE(IDC_LIST_INFO_BROADCASTING, &CAgoraEffectDlg::OnSelchangeListInfoBroadcasting)
71
77
ON_WM_SHOWWINDOW()
72
78
ON_BN_CLICKED(IDC_BUTTON_STOP_EFFECT, &CAgoraEffectDlg::OnBnClickedButtonStopEffect)
@@ -187,7 +193,7 @@ void CAgoraEffectDlg::ResumeStatus()
187
193
m_lstInfo.ResetContent ();
188
194
m_edtChannel.SetWindowText (_T (" " ));
189
195
m_edtEffectPath.SetWindowText (_T (" " ));
190
- m_edtGain.SetWindowText (_T (" 0 .0" ));
196
+ m_edtGain.SetWindowText (_T (" 100 .0" ));
191
197
m_edtLoops.SetWindowText (_T (" 0" ));
192
198
m_edtPitch.SetWindowText (_T (" 1.0" ));
193
199
m_cmbPan.SetCurSel (0 );
@@ -234,13 +240,13 @@ void CAgoraEffectDlg::OnBnClickedButtonAddEffect()
234
240
CString strPath;
235
241
m_edtEffectPath.GetWindowText (strPath);
236
242
// judge file is exists.
237
- if (PathFileExists ( strPath))
243
+ if (! strPath. IsEmpty ( ))
238
244
{
239
245
m_cmbEffect.InsertString (m_cmbEffect.GetCount (), strPath);
240
246
m_mapEffect.insert (std::make_pair (strPath, m_soundId++));
241
247
}
242
248
else {
243
- MessageBox (_T (" file is not exists ." ));
249
+ MessageBox (_T (" url can not empty ." ));
244
250
}
245
251
m_cmbEffect.SetCurSel (0 );
246
252
}
@@ -257,7 +263,7 @@ void CAgoraEffectDlg::OnBnClickedButtonPreload()
257
263
m_cmbEffect.GetWindowText (strEffect);
258
264
std::string strPath = cs2utf8 (strEffect);
259
265
// pre load effect
260
- m_rtcEngine->preloadEffect (m_mapEffect[strEffect], strPath.c_str ());
266
+ int nRet = m_rtcEngine->preloadEffect (m_mapEffect[strEffect], strPath.c_str ());
261
267
CString strInfo;
262
268
strInfo.Format (_T (" preload effect :path:%s" ), strEffect);
263
269
m_lstInfo.InsertString (m_lstInfo.GetCount (), strInfo);
@@ -326,9 +332,9 @@ void CAgoraEffectDlg::OnBnClickedButtonResumeEffect()
326
332
m_cmbEffect.GetWindowText (strEffect);
327
333
// resume effect by sound id.
328
334
m_rtcEngine->resumeEffect (m_mapEffect[strEffect]);
329
-
335
+
330
336
CString strInfo;
331
- strInfo.Format (_T (" resume effect :path:%s" ),strEffect);
337
+ strInfo.Format (_T (" resume effect :path:%s" ), strEffect);
332
338
m_lstInfo.InsertString (m_lstInfo.GetCount (), strInfo);
333
339
}
334
340
@@ -361,8 +367,8 @@ void CAgoraEffectDlg::OnBnClickedButtonPlayEffect()
361
367
362
368
BOOL publish = m_chkPublish.GetCheck ();
363
369
// play effect by effect path.
364
- m_rtcEngine->playEffect (m_mapEffect[strEffect], strFile.c_str (), loops, pitch, pan, gain, publish);
365
-
370
+ int nRet = m_rtcEngine->playEffect (m_mapEffect[strEffect], strFile.c_str (),
371
+ loops, pitch, pan, gain, publish);
366
372
CString strInfo;
367
373
strInfo.Format (_T (" play effect :path:%s,loops:%d,pitch:%.1f,pan:%.0f,gain:%d,publish:%d" ),
368
374
strEffect, loops, pitch, pan, gain, publish);
0 commit comments