Example #1
0
 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);
     }
 }
Example #2
0
        private void buttonExtEffects_Click(object sender, EventArgs e)
        {
            SoundEffectsDialog sfe = new SoundEffectsDialog();

            sfe.Init(this.Icon, effects, true);
            sfe.TestSettingEvent     += Sfe_TestSettingEvent;       // callback to say test
            sfe.StopTestSettingEvent += Sfe_StopTestSettingEvent;   // callback to say stop
            if (sfe.ShowDialog(this) == DialogResult.OK)
            {
                effects = sfe.GetEffects();
            }
        }
Example #3
0
        private void buttonExtEffects_Click(object sender, EventArgs e)
        {
            SoundEffectsDialog sfe = new SoundEffectsDialog();

            sfe.Init(effects, textBoxBorderText.Visible);           // give them the none option ONLY if we are allowing text
            sfe.TestSettingEvent     += Sfe_TestSettingEvent;       // callback to say test
            sfe.StopTestSettingEvent += Sfe_StopTestSettingEvent;   // callback to say stop
            if (sfe.ShowDialog(this) == DialogResult.OK)
            {
                effects = sfe.GetEffects();
            }
        }
Example #4
0
 private void Sfe_TestSettingEvent(SoundEffectsDialog sfe, ConditionVariables effects)
 {
     try
     {
         AudioQueue.AudioSample a = queue.Generate(textBoxBorderText.Text, new SoundEffectSettings(effects));
         a.sampleOverEvent += SampleOver;
         a.sampleOverTag    = sfe;
         queue.Submit(a, trackBarVolume.Value, AudioQueue.Priority.High);
     }
     catch
     {
         ExtendedControls.MessageBoxTheme.Show(this, "Unable to play " + textBoxBorderText.Text);
     }
 }
Example #5
0
        private void SampleOver(AudioQueue s, Object tag)
        {
            SoundEffectsDialog sfe = tag as SoundEffectsDialog;

            sfe.TestOver();
        }
Example #6
0
 private void Sfe_StopTestSettingEvent(SoundEffectsDialog sender)
 {
     queue.StopCurrent();
 }