internal static void WaveOutProc(IntPtr hdrvr, int uMsg, int dwUser, ref WaveHdr wavhdr, int dwParam2) { if (uMsg == Winmm.MM_WOM_DONE) { try { var h = (GCHandle)wavhdr.dwUser; var buf = (WaveOutBuffer)h.Target; buf.OnCompleted(); } catch { } } }
public static extern int waveOutWrite(IntPtr hWaveOut, ref WaveHdr lpWaveOutHdr, int uSize);
public static extern int waveInPrepareHeader(IntPtr hWaveIn, ref WaveHdr lpWaveInHdr, int uSize);
public static extern int waveOutUnprepareHeader(IntPtr hWaveOut, ref WaveHdr lpWaveOutHdr, int uSize);
public static extern int waveInAddBuffer(IntPtr hwi, ref WaveHdr pwh, int cbwh);