public override void Dispose()
 {
     _egg.Dispose();
     _cake.Dispose();
     _die.Dispose();
     _duck.Dispose();
     base.Dispose();
 }
Esempio n. 2
0
        private void btnLoad_Click(object sender, EventArgs e)
        {
            OpenFileDialog diag = new OpenFileDialog();

            diag.Filter           = "Audio (wave)|*.wav";
            diag.InitialDirectory = Application.StartupPath;
            if (diag.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (voice != null)
                {
                    voice.Dispose();
                }

                //load from file
                voice           = new SharpAudioVoice(device, diag.FileName);
                btnPlay.Enabled = true;
                btnStop.Enabled = false;
            }
        }