internal override void InjectEvent(TTSEvent ttsEvent) { if (!_aborted && _asyncDispatch != null) { _asyncDispatch.Post(ttsEvent); } }
internal override void InjectEvent(TTSEvent ttsEvent) { if (_asyncDispatch != null && !_aborted) { lock (_queueIn) { if (_queueIn.Count == 0) { _asyncDispatch.Post(ttsEvent); } else { _queueIn.Add(new InItem(ttsEvent)); } } } }
internal void SendNotification(object ignored) { lock (this) { if (_sapiEventSourceReference != null) { ISpEventSource spEventSource = (ISpEventSource)_sapiEventSourceReference.Target; if (spEventSource != null) { List <SpeechEvent> list = new List <SpeechEvent>(); SpeechEvent item; while ((item = SpeechEvent.TryCreateSpeechEvent(spEventSource, _additionalSapiFeatures, _audioFormat)) != null) { list.Add(item); } _dispatcher.Post(list.ToArray()); } } } }