コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
ファイル: CAudioPlay.cs プロジェクト: gchudov/WindowsMediaLib
        /// <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);
        }
コード例 #4
0
ファイル: MixerAPI.cs プロジェクト: lscyane/KCBr
 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);
 }
コード例 #5
0
ファイル: MixerAPI.cs プロジェクト: lscyane/KCBr
 static extern uint mixerOpen(ref IntPtr phmx, uint pMxId,
             IntPtr dwCallback, IntPtr dwInstance, MIXER_OBJECTF fdwOpen);
コード例 #6
0
ファイル: MixerAPI.cs プロジェクト: lscyane/KCBr
 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);
 }
コード例 #7
0
ファイル: MixerAPI.cs プロジェクト: lscyane/KCBr
 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);
 }
コード例 #8
0
        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));
        }
コード例 #9
0
 static extern uint mixerOpen(ref IntPtr phmx, uint pMxId,
                              IntPtr dwCallback, IntPtr dwInstance, MIXER_OBJECTF fdwOpen);
コード例 #10
0
 public static extern MMSYSERR GetID(
     IntPtr hmxobj,
     out int puMxId,
     MIXER_OBJECTF fdwId);
コード例 #11
0
 public static extern MMSYSERR Open(
     out IntPtr phmx,
     int uMxId,
     IntPtr dwCallback,
     IntPtr dwInstance,
     MIXER_OBJECTF fdwOpen);
コード例 #12
0
 public static extern MMSYSERR GetControlDetails(
     IntPtr hmxobj,
     [In, Out, MarshalAs(UnmanagedType.LPStruct)] MixerControlDetails pmxcd,
     MIXER_OBJECTF fdwDetails);