public void Create() { if (handle == IntPtr.Zero) { handle = AquesTalkLib.AquesTalkDa_Create(); } }
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); } }
public void Stop() { AquesTalkLib.AquesTalkDa_Stop(handle); }
public void Release() { AquesTalkLib.AquesTalkDa_Release(handle); handle = IntPtr.Zero; }