uint mixerGetLineControls(IntPtr hmxobj, ref MIXERLINECONTROLS pmxlc, MIXER_OBJECTF objFlag, MIXER_GETLINECONTROLSF ctlFlag) { uint flag = (uint)objFlag | (uint)ctlFlag; return(mixerGetLineControls(hmxobj, ref pmxlc, flag)); }
uint mixerGetLineInfo(IntPtr hmxobj, ref MIXERLINE pmxl, MIXER_OBJECTF objF, MIXER_GETLINEINFOF lineF) { uint flag = (uint)objF | (uint)lineF; return(mixerGetLineInfo(hmxobj, ref pmxl, flag)); }
/// <summary> /// Start playing the audio /// </summary> /// <param name="cnsStart"></param> public void Start(long cnsStart) { // // Ensure that a reader object has been instantiated. // if (IsDisposed()) { throw new COMException("Instance has been Disposed", E_Unexpected); } m_OldTime = -1; // // Configure the wave output device. // if (IntPtr.Zero != m_hWaveOut) { int woe = waveOut.Reset(m_hWaveOut); waveOut.ThrowExceptionForError(woe); } else { int mmr = waveOut.Open(out m_hWaveOut, m_DeviceIndex, m_pWfx, IntPtr.Zero, IntPtr.Zero, WaveOpenFlags.Null); waveOut.ThrowExceptionForError(mmr); // If a form was provided if (m_fForm != null) { // Ensure volume change events get sent MIXER_OBJECTF flags = MIXER_OBJECTF.CallBack_Window | MIXER_OBJECTF.WaveOut; MMSYSERR rc = Mixer.Open(out m_hMixer, m_DeviceIndex, m_fForm.Handle, IntPtr.Zero, flags); // Not checking for error. If something goes wrong, rather than fail the call, we // just won't update the volume bar } for (int x = 0; x < MAXBUFFERS; x++) { m_InsBuf[x] = new INSBuf(m_hWaveOut, m_MaxSampleSize); } } m_pReader.Start(cnsStart, 0, 1.0f, IntPtr.Zero); }
static uint mixerSetControlDetails(IntPtr hmxobj, ref MIXERCONTROLDETAILS pmxcd, MIXER_OBJECTF fdwDetails, MIXER_GETCONTROLDETAILSF getControlDetails) { uint flags = ((uint)fdwDetails | (uint)getControlDetails); return mixerSetControlDetails(hmxobj, ref pmxcd, flags); }
static extern uint mixerOpen(ref IntPtr phmx, uint pMxId, IntPtr dwCallback, IntPtr dwInstance, MIXER_OBJECTF fdwOpen);
uint mixerGetLineControls(IntPtr hmxobj, ref MIXERLINECONTROLS pmxlc, MIXER_OBJECTF objFlag, MIXER_GETLINECONTROLSF ctlFlag) { uint flag = (uint)objFlag | (uint)ctlFlag; return mixerGetLineControls(hmxobj, ref pmxlc, flag); }
uint mixerGetLineInfo(IntPtr hmxobj, ref MIXERLINE pmxl,MIXER_OBJECTF objF , MIXER_GETLINEINFOF lineF ) { uint flag = (uint)objF | (uint)lineF; return mixerGetLineInfo(hmxobj, ref pmxl, flag); }
static uint mixerSetControlDetails(IntPtr hmxobj, ref MIXERCONTROLDETAILS pmxcd, MIXER_OBJECTF fdwDetails, MIXER_GETCONTROLDETAILSF getControlDetails) { uint flags = ((uint)fdwDetails | (uint)getControlDetails); return(mixerSetControlDetails(hmxobj, ref pmxcd, flags)); }
public static extern MMSYSERR GetID( IntPtr hmxobj, out int puMxId, MIXER_OBJECTF fdwId);
public static extern MMSYSERR Open( out IntPtr phmx, int uMxId, IntPtr dwCallback, IntPtr dwInstance, MIXER_OBJECTF fdwOpen);
public static extern MMSYSERR GetControlDetails( IntPtr hmxobj, [In, Out, MarshalAs(UnmanagedType.LPStruct)] MixerControlDetails pmxcd, MIXER_OBJECTF fdwDetails);