private void Sfe_TestSettingEvent(SoundEffectsDialog sfe, ConditionVariables effects) { System.IO.MemoryStream ms = synth.Speak(textBoxBorderTest.Text, "Default", comboBoxCustomVoice.Text, trackBarRate.Value); if (ms != null) { AudioQueue.AudioSample a = queue.Generate(ms, effects); a.sampleOverEvent += SampleOver; a.sampleOverTag = sfe; queue.Submit(a, trackBarVolume.Value, AudioQueue.Priority.High); } }
private void buttonExtTest_Click(object sender, EventArgs e) { if (buttonExtTest.Text.Equals("Stop")) { queue.StopCurrent(); } else { try { AudioQueue.AudioSample audio = queue.Generate(textBoxBorderText.Text, new SoundEffectSettings(effects)); audio.sampleOverEvent += Audio_sampleOverEvent; queue.Submit(audio, trackBarVolume.Value, AudioQueue.Priority.High); buttonExtTest.Text = "Stop"; } catch { ExtendedControls.MessageBoxTheme.Show(this, "Unable to play " + textBoxBorderText.Text); } } }