コード例 #1
0
 public void Create()
 {
     if (handle == IntPtr.Zero)
     {
         handle = AquesTalkLib.AquesTalkDa_Create();
     }
 }
コード例 #2
0
        public int Play(string kana, int speed, IntPtr notification)
        {
            var bKana = System.Text.Encoding.UTF8.GetBytes(kana);
            var pKana = Marshal.AllocHGlobal(bKana.Length);

            try
            {
                Marshal.Copy(bKana, 0, pKana, bKana.Length);
                return(AquesTalkLib.AquesTalkDa_Play_Utf8(handle, pKana, speed, notification));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Marshal.FreeHGlobal(pKana);
            }
        }
コード例 #3
0
 public void Stop()
 {
     AquesTalkLib.AquesTalkDa_Stop(handle);
 }
コード例 #4
0
 public void Release()
 {
     AquesTalkLib.AquesTalkDa_Release(handle);
     handle = IntPtr.Zero;
 }