public WaveDataBlock(WaveHandle waveOutHandle, int size) { m_WaveOut = waveOutHandle; m_HeaderHandle = GCHandle.Alloc(m_Header, GCHandleType.Pinned); m_Header.dwUser = (IntPtr)GCHandle.Alloc(this); m_HeaderData = new byte[size]; m_HeaderDataHandle = GCHandle.Alloc(m_HeaderData, GCHandleType.Pinned); m_Header.lpData = m_HeaderDataHandle.AddrOfPinnedObject(); m_Header.dwBufferLength = size; MM.Check(Api.waveOutPrepareHeader(m_WaveOut, ref m_Header, Marshal.SizeOf(m_Header))); }
public static extern MMSysErr waveOutPause(WaveHandle h);
public static extern MMSysErr waveOutOpen(out WaveHandle hWaveOut, int uDeviceID, WaveFormat lpFormat, waveOutProc dwCallback, IntPtr dwInstance, WaweOutFlag dwFlags);
public static extern int waveOutGetVolume(WaveHandle h, out int dwVolume);
public static extern MMSysErr waveOutGetPosition(WaveHandle h, ref MMTIME mmtime, uint cbmmt);
public static extern int waveOutGetPosition(WaveHandle h, out int lpInfo, int uSize);
public static extern MMSysErr waveOutUnprepareHeader(WaveHandle h, ref WaveHdr lpWaveOutHdr, int uSize);
public static extern MMSysErr waveOutWrite(WaveHandle h, ref WaveHdr lpWaveOutHdr, int uSize);
public static extern int waveOutSetVolume(WaveHandle h, int dwVolume);
public static extern MMSysErr waveOutRestart(WaveHandle h);
public static extern MMSysErr waveOutReset(WaveHandle h);