@@ -67,6 +67,12 @@ BEGIN_MESSAGE_MAP(CAgoraEffectDlg, CDialogEx)
6767 ON_BN_CLICKED(IDC_BUTTON_STOP_ALL_EFFECT2, &CAgoraEffectDlg::OnBnClickedButtonStopAllEffect2)
6868 ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_AGIN, &CAgoraEffectDlg::OnDeltaposSpinGain)
6969 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+
7076 ON_LBN_SELCHANGE(IDC_LIST_INFO_BROADCASTING, &CAgoraEffectDlg::OnSelchangeListInfoBroadcasting)
7177 ON_WM_SHOWWINDOW()
7278 ON_BN_CLICKED(IDC_BUTTON_STOP_EFFECT, &CAgoraEffectDlg::OnBnClickedButtonStopEffect)
@@ -187,7 +193,7 @@ void CAgoraEffectDlg::ResumeStatus()
187193 m_lstInfo.ResetContent ();
188194 m_edtChannel.SetWindowText (_T (" " ));
189195 m_edtEffectPath.SetWindowText (_T (" " ));
190- m_edtGain.SetWindowText (_T (" 0 .0" ));
196+ m_edtGain.SetWindowText (_T (" 100 .0" ));
191197 m_edtLoops.SetWindowText (_T (" 0" ));
192198 m_edtPitch.SetWindowText (_T (" 1.0" ));
193199 m_cmbPan.SetCurSel (0 );
@@ -234,13 +240,13 @@ void CAgoraEffectDlg::OnBnClickedButtonAddEffect()
234240 CString strPath;
235241 m_edtEffectPath.GetWindowText (strPath);
236242 // judge file is exists.
237- if (PathFileExists ( strPath))
243+ if (! strPath. IsEmpty ( ))
238244 {
239245 m_cmbEffect.InsertString (m_cmbEffect.GetCount (), strPath);
240246 m_mapEffect.insert (std::make_pair (strPath, m_soundId++));
241247 }
242248 else {
243- MessageBox (_T (" file is not exists ." ));
249+ MessageBox (_T (" url can not empty ." ));
244250 }
245251 m_cmbEffect.SetCurSel (0 );
246252}
@@ -257,7 +263,7 @@ void CAgoraEffectDlg::OnBnClickedButtonPreload()
257263 m_cmbEffect.GetWindowText (strEffect);
258264 std::string strPath = cs2utf8 (strEffect);
259265 // 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 ());
261267 CString strInfo;
262268 strInfo.Format (_T (" preload effect :path:%s" ), strEffect);
263269 m_lstInfo.InsertString (m_lstInfo.GetCount (), strInfo);
@@ -326,9 +332,9 @@ void CAgoraEffectDlg::OnBnClickedButtonResumeEffect()
326332 m_cmbEffect.GetWindowText (strEffect);
327333 // resume effect by sound id.
328334 m_rtcEngine->resumeEffect (m_mapEffect[strEffect]);
329-
335+
330336 CString strInfo;
331- strInfo.Format (_T (" resume effect :path:%s" ),strEffect);
337+ strInfo.Format (_T (" resume effect :path:%s" ), strEffect);
332338 m_lstInfo.InsertString (m_lstInfo.GetCount (), strInfo);
333339}
334340
@@ -361,8 +367,8 @@ void CAgoraEffectDlg::OnBnClickedButtonPlayEffect()
361367
362368 BOOL publish = m_chkPublish.GetCheck ();
363369 // 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);
366372 CString strInfo;
367373 strInfo.Format (_T (" play effect :path:%s,loops:%d,pitch:%.1f,pan:%.0f,gain:%d,publish:%d" ),
368374 strEffect, loops, pitch, pan, gain, publish);
0 commit comments