示例#1
0
 public static void Play(short[] soundData)
 {
     using (WaveGenerator waveGenerator = new WaveGenerator(soundData))
     {
         //waveGenerator.Save("D:\\debugTest.wav");
         waveGenerator.GenerateSoundStream();
         waveGenerator.Play();
     }
 }
示例#2
0
 private void GenerateWaveButton_Click(object sender, EventArgs e)
 {
     using (WaveGenerator waveGenerator = new WaveGenerator())
     {
         //waveGenerator.Save("D:\\debugTest.wav");
         waveGenerator.GenerateSoundStream();
         waveGenerator.Play();
     }
 }