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; } }
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)); } }