Exemplo n.º 1
0
 private void Sfe_TestSettingEvent(SoundEffectsDialog sfe, Variables effects)
 {
     System.IO.MemoryStream ms = synth.Speak(textBoxBorderTest.Text, "Default", comboBoxCustomVoice.Text, trackBarRate.Value);
     if (ms != null)
     {
         AudioQueue.AudioSample a = queue.Generate(ms, new SoundEffectSettings(effects));
         a.sampleOverEvent += SampleOver;
         a.sampleOverTag    = sfe;
         queue.Submit(a, trackBarVolume.Value, AudioQueue.Priority.High);
     }
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 3
0
        private void buttonExtEffects_Click(object sender, EventArgs e)
        {
            SoundEffectsDialog sfe = new SoundEffectsDialog();

            sfe.Init(this.Icon, 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();
            }
        }
Exemplo n.º 4
0
 private void Sfe_TestSettingEvent(SoundEffectsDialog sfe, Variables 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);
     }
 }
Exemplo n.º 5
0
        private void SampleOver(AudioQueue s, Object tag)
        {
            SoundEffectsDialog sfe = tag as SoundEffectsDialog;

            sfe.TestOver();
        }
Exemplo n.º 6
0
 private void Sfe_StopTestSettingEvent(SoundEffectsDialog sender)
 {
     queue.StopCurrent();
 }