|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //using BPASmartClient.Message;
- //using System;
- //using System.Collections.Concurrent;
- //using System.Collections.Generic;
- //using System.Linq;
- //using System.Runtime.InteropServices;
- //using System.Text;
- //using System.Threading;
- //using System.Threading.Tasks;
-
- //namespace BPASmartClient.MorkS
- //{
- // public class VoiceAPI
- // {
- // public VoiceAPI()
- // {
- // BPA.Helper.ThreadManage.GetInstance().StartLong(new Action(() =>
- // {
- // while (msg.Count > 0)
- // {
- // if (msg.TryDequeue(out string str))
- // {
- // WaitMeaLSpeak(str);
- // }
- // }
-
- // Thread.Sleep(1000);
-
- // }), "语音播报", true);
- // }
-
- // [DllImport("winmm.dll")]
- // public static extern bool PlaySound(string pszSound, int hmod, int fdwSound);
-
- // private static ConcurrentQueue<string> msg { get; set; } = new ConcurrentQueue<string>();
-
-
- // public static void Speak(string s) => msg.Enqueue(s);
-
-
- // // 系统播放wav格式的文件
- // private static void m_SystemPlayWav(string strPlayFile)
- // {
- // try
- // {
- // if (strPlayFile.Trim() == "")
- // { return; }//为空不放
-
- // string strPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
- // strPath = strPath + strPlayFile;
-
- // int SND_FILENAME = 0x00020000;
- // int SND_ASYNC = 0x0001;
- // PlaySound(strPath, 0, SND_ASYNC | SND_FILENAME);//播放音乐
- // }
- // catch (Exception ex)
- // {
- // MessageLog.GetInstance.ShowEx(ex.Message);
- // }
- // }
-
- // private void WaitMeaLSpeak(string meal, int count = 1, int IntervalTime = 1000)
- // {
- // m_SystemPlayWav(@"Vioce\电子提示音.wav");
- // Thread.Sleep(1000);
- // for (int m = 0; m < count; m++)
- // {
- // m_SystemPlayWav(@"Vioce\请.wav");
- // Thread.Sleep(500);
- // for (int i = 0; i < meal.Length; i++)
- // {
- // string name = meal.Substring(i, 1);
- // m_SystemPlayWav($"Vioce\\{name}.wav");
- // Thread.Sleep(500);
- // }
- // m_SystemPlayWav(@"Vioce\号用户取餐.wav");
- // Thread.Sleep(1500 + IntervalTime);
- // }
- // }
- // }
- //}
|