Example #1
0
        public void loadFile(String filename)
        {
            WavStream S = new WavStream(filename);

            if (S.Length <= 0)
            {
                throw new Exception("Invalid WAV file");
            }
            format      = S.Format;
            BUF_SIZE    = (int)(format.nAvgBytesPerSec / 10.2);
            audioStream = S;
            Native.waveOutOpen(out waveOut, device, ref format, null, 0, Native.CALLBACK_FUNCTION);
            count_stream = 0;
            finish       = 0;
        }
Example #2
0
 public void flush()
 {
     audioStream  = null;
     count_stream = 0;
     finish       = 0;
 }