예제 #1
0
 private void resumeplayfile_Click(object sender, EventArgs e)
 {
     if (m_tagpstnData[(short)selchannel.SelectedIndex].lPlayFileHandle > 0)
     {
         BriSDKLib.QNV_PlayFile((short)selchannel.SelectedIndex, BriSDKLib.QNV_PLAY_FILE_RESUME, m_tagpstnData[(short)selchannel.SelectedIndex].lPlayFileHandle, 0, "");
     }
 }
예제 #2
0
 private void stopplayfile_Click(object sender, EventArgs e)
 {
     if (m_tagpstnData[(short)selchannel.SelectedIndex].lPlayFileHandle > 0)
     {
         BriSDKLib.QNV_PlayFile((short)selchannel.SelectedIndex, BriSDKLib.QNV_PLAY_FILE_STOP, m_tagpstnData[(short)selchannel.SelectedIndex].lPlayFileHandle, 0, "");
         m_tagpstnData[(short)selchannel.SelectedIndex].lPlayFileHandle = 0;
         AppendStatus("停止播放文件");
     }
 }
예제 #3
0
 private void startplayfile_Click(object sender, EventArgs e)
 {
     {
         OpenFileDialog dlg = new OpenFileDialog();
         if (dlg.ShowDialog() == DialogResult.OK)
         {
             //this.textBox1.Text = dlg.FileName;
             //PLAYFILE_MASK_REPEAT 使用重复播放
             m_tagpstnData[(short)selchannel.SelectedIndex].lPlayFileHandle = BriSDKLib.QNV_PlayFile((short)selchannel.SelectedIndex, BriSDKLib.QNV_PLAY_FILE_START, 0, BriSDKLib.PLAYFILE_MASK_REPEAT, dlg.FileName);
             if (m_tagpstnData[(short)selchannel.SelectedIndex].lPlayFileHandle <= 0)
             {
                 AppendStatus("播放文件失败:" + dlg.FileName);
             }
             else
             {
                 AppendStatus("开始播放文件:" + dlg.FileName);
             }
         }
     }
 }
예제 #4
0
 /// <summary>
 /// 停止播放语音文件
 /// </summary>
 /// <param name="handle">语音句柄</param>
 /// <returns>大于0表示成功,其它表示失败</returns>
 public static int StopVoice(int handle)
 {
     return(BriSDKLib.QNV_PlayFile(0, BriSDKLib.QNV_PLAY_FILE_STOP, handle, 0, ""));
 }
예제 #5
0
 /// <summary>
 /// 播放语音文件
 /// </summary>
 /// <param name="path">语音文件路径</param>
 /// <returns>播放语音的句柄</returns>
 public static int PlayVoice(string path)
 {
     return(BriSDKLib.QNV_PlayFile(0, BriSDKLib.QNV_PLAY_FILE_START, 0, BriSDKLib.PLAYFILE_MASK_REPEAT, path));
 }