コード例 #1
0
ファイル: Mixer.cs プロジェクト: h4ltYu/EOS
 public Mixer(int mixerIndex)
 {
     if (mixerIndex < 0 || mixerIndex >= Mixer.NumberOfDevices)
     {
         throw new ArgumentOutOfRangeException("mixerID");
     }
     this.caps = default(MixerInterop.MIXERCAPS);
     MmException.Try(MixerInterop.mixerGetDevCaps((IntPtr)mixerIndex, ref this.caps, Marshal.SizeOf(this.caps)), "mixerGetDevCaps");
     this.mixerHandle     = (IntPtr)mixerIndex;
     this.mixerHandleType = MixerFlags.Mixer;
 }
コード例 #2
0
        /// <summary>Connects to the specified mixer</summary>
        /// <param name="mixerIndex">The index of the mixer to use.
        /// This should be between zero and NumberOfDevices - 1</param>
        public Mixer(int mixerIndex)
        {
            if (mixerIndex < 0 || mixerIndex >= NumberOfDevices)
            {
                throw new ArgumentOutOfRangeException("mixerID");
            }
            caps = new MixerInterop.MIXERCAPS();
            MmException.Try(MixerInterop.mixerGetDevCaps((IntPtr)mixerIndex, ref caps, Marshal.SizeOf(caps)), "mixerGetDevCaps");
            this.mixerHandle     = (IntPtr)mixerIndex;
            this.mixerHandleType = MixerFlags.Mixer;

            //MmException.Try(MixerInterop.mixerOpen(out mixerHandle, mixerIndex, IntPtr.Zero, IntPtr.Zero, 0), "mixerOpen");
        }