Пример #1
0
        public void Free()
        {
            if (this.yukkuriLib != null)
            {
                this.IsLoadedAppKey = false;

                this.SetDevKeyDelegate = null;
                this.SynthesizeDelegate = null;
                this.SynthesizeUTF16Delegate = null;
                this.FreeWaveDelegate = null;

                this.yukkuriLib.Dispose();
                this.yukkuriLib = null;
            }
        }
Пример #2
0
        public void Load()
        {
            if (!NetiveMethods.IsModuleLoaded(YukkuriLibName))
            {
                this.yukkuriLib = new UnmanagedLibrary(YukkuriDllName);
            }

            if (this.yukkuriLib != null)
            {
                if (this.SynthesizeDelegate == null)
                {
                    this.SynthesizeDelegate =
                        this.yukkuriLib.GetUnmanagedFunction <AquesTalk_Synthe>(nameof(AquesTalk_Synthe));
                }

                if (this.FreeWaveDelegate == null)
                {
                    this.FreeWaveDelegate =
                        this.yukkuriLib.GetUnmanagedFunction <AquesTalk_FreeWave>(nameof(AquesTalk_FreeWave));
                }
            }
        }
Пример #3
0
        public void Load()
        {
            if (this.yukkuriLib == null)
            {
                this.yukkuriLib = new UnmanagedLibrary(YukkuriDllName);
                this.IsLoadedAppKey = false;
            }

            if (this.yukkuriLib == null)
            {
                return;
            }

            if (this.SetDevKeyDelegate == null)
            {
                this.SetDevKeyDelegate =
                    this.yukkuriLib.GetUnmanagedFunction<AquesTalk_SetDevKey>(nameof(AquesTalk_SetDevKey));
            }

            if (this.SynthesizeDelegate == null)
            {
                this.SynthesizeDelegate =
                    this.yukkuriLib.GetUnmanagedFunction<AquesTalk_Synthe>(nameof(AquesTalk_Synthe));
            }

            if (this.SynthesizeUTF16Delegate == null)
            {
                this.SynthesizeUTF16Delegate =
                    this.yukkuriLib.GetUnmanagedFunction<AquesTalk_Synthe_Utf16>(nameof(AquesTalk_Synthe_Utf16));
            }

            if (this.FreeWaveDelegate == null)
            {
                this.FreeWaveDelegate =
                    this.yukkuriLib.GetUnmanagedFunction<AquesTalk_FreeWave>(nameof(AquesTalk_FreeWave));
            }
        }