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); } } }
private void Sfe_StopTestSettingEvent(SoundEffectsDialog sender) { queue.StopCurrent(); }