waveOutOpen() приватный Метод

private waveOutOpen ( IntPtr &hWaveOut, int uDeviceID, WaveFormat lpFormat, WaveDelegate dwCallback, int dwInstance, int dwFlags ) : int
hWaveOut System.IntPtr
uDeviceID int
lpFormat WaveFormat
dwCallback WaveDelegate
dwInstance int
dwFlags int
Результат int
Пример #1
0
 public WaveOutPlayer(int device, WaveFormat format, int bufferSize, int bufferCount, BufferFillEventHandler fillProc)
 {
     m_zero     = format.wBitsPerSample == 8 ? (byte)128 : (byte)0;
     m_FillProc = fillProc;
     WaveOutHelper.Try(WaveNative.waveOutOpen(out m_WaveOut, device, format, m_BufferProc, 0, WaveNative.CALLBACK_FUNCTION));
     AllocateBuffers(bufferSize, bufferCount);
     m_Thread = new Thread(new ThreadStart(ThreadProc));
     m_Thread.Start();
 }
Пример #2
0
 public WaveOutPlayer(
     int device,
     WaveFormat format,
     int bufferSize,
     int bufferCount,
     BufferFillEventHandler fillProc)
 {
     this.m_zero     = format.wBitsPerSample == (short)8 ? (byte)128 : (byte)0;
     this.m_FillProc = fillProc;
     WaveOutHelper.Try(WaveNative.waveOutOpen(out this.m_WaveOut, device, format, this.m_BufferProc, 0, 196608));
     this.AllocateBuffers(bufferSize, bufferCount);
     this.m_Thread = new Thread(new ThreadStart(this.ThreadProc));
     this.m_Thread.Start();
 }