Exemple #1
0
        public WaveRecorder(System.Windows.Forms.Form parent)
        {
            parentHandle = parent.Handle;
            MsgQueue = new BlockingCollection<RecorderMsg>();

            hWaveIn = new IntPtr();
            WaveInProc = new WinmmHook.WaveDelegate(WIM_proc);

            pBuffer1 = new byte[INP_BUFFER_SIZE];
            pBuffer2 = new byte[INP_BUFFER_SIZE];
            waveform = new WaveFormat(11025, 8, 1);
        }
Exemple #2
0
 public void setWave(WaveFile source)
 {
     wave = source;
     waveform = new WaveFormat(wave.sampleRate, wave.bitDepth, wave.channels);
     pbuffer = wave.getData();
 }
Exemple #3
0
 public static extern int waveInOpen(out IntPtr hWaveIn, int uDeviceID, WaveFormat lpFormat, WaveDelegate dwCallback, int dwInstance, int dwFlags);
Exemple #4
0
 public static extern int waveOutOpen(out IntPtr hWaveOut, int uDeviceID, WaveFormat lpFormat, WaveDelegate dwCallback, int dwInstance, int dwFlags);