protected virtual void OnTTSBookmark(TTSEventArgs e) { if (this.TTSBookmark != null) { this.TTSBookmark(this, e); } }
protected virtual void OnTTSPhonemeLabel(TTSEventArgs e) { if (this.TTSPhonemeLabel != null) { this.TTSPhonemeLabel(this, e); } }
protected override int MyAITalkProcEventTTS(AITalkEventReasonCode reasonCode, int jobID, ulong tick, string name, IntPtr userData) { base.OnWriteLog(string.Concat(new object[] { "Callback [AITalkProcEventTTS] ", jobID, " : ", reasonCode.ToString(), " : ", tick, " : ", name, " : ", (int)userData })); TTSEventArgs e = new TTSEventArgs(tick, name); if (reasonCode == AITalkEventReasonCode.AITALKEVENT_BOOKMARK) { int num; string text = this._jobInfo.ProgressBookMark(name, out num); if (text == null) { return(0); } if ((this.SynthMode & AITalk.SynthMode.Play) == AITalk.SynthMode.Play) { AudioEventParam item = new AudioEventParam(AudioEventCode.Bookmark, num, text, "", tick); this._jobInfo.AudioEventQueue.Enqueue(item); } this.InvokeUserEventHandler <TTSEventArgs>(new EventInVoker <TTSEventArgs>(this.OnTTSBookmark), e); } else if (reasonCode == AITalkEventReasonCode.AITALKEVENT_PH_LABEL) { if ((this.SynthMode & AITalk.SynthMode.Play) == AITalk.SynthMode.Play) { AudioEventParam param2 = new AudioEventParam(AudioEventCode.PhonemeLabel, 0, name, "", tick); this._jobInfo.AudioEventQueue.Enqueue(param2); } this.InvokeUserEventHandler <TTSEventArgs>(new EventInVoker <TTSEventArgs>(this.OnTTSPhonemeLabel), e); } return(0); }