Beispiel #1
0
 private void button_play_Click(object sender, EventArgs e)
 {
     if (_wr != null && _wr.GetData() != null)
     {
         if (myChart.ChooseAreaMin < myChart.ChooseAreaMax)
         {
             _player = new PCMPlayer(_wr.GetData(),
                                     myChart.ChooseAreaMin,
                                     myChart.ChooseAreaMax,
                                     _wr.GetNum_Channels(), _wr.GetSamplesPerSec(), (short)_wr.GetBitsPerSample());
         }
         else
         {
             _player = new PCMPlayer(_wr.GetData(),
                                     0,
                                     _wr.GetData().Length,
                                     _wr.GetNum_Channels(), _wr.GetSamplesPerSec(), (short)_wr.GetBitsPerSample());
         }
         _player.Play();
     }
 }