コード例 #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);
     }
 }
コード例 #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();
            }
        }
コード例 #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();
            }
        }
コード例 #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);
     }
 }
コード例 #5
0
        private void SampleOver(AudioQueue s, Object tag)
        {
            SoundEffectsDialog sfe = tag as SoundEffectsDialog;

            sfe.TestOver();
        }
コード例 #6
0
 private void Sfe_StopTestSettingEvent(SoundEffectsDialog sender)
 {
     queue.StopCurrent();
 }