Ejemplo n.º 1
0
        public Device() : base("Windows Audio")
        {
            List <Channel> channels = new List <Channel>();
            int            count    = Winmm.waveOutGetNumDevs();

            for (int i = 0; i < count; ++i)
            {
                WAVEOUTCAPS caps = new WAVEOUTCAPS();
                MmException.CheckThrow(Winmm.waveOutGetDevCaps(new IntPtr(i), ref caps, (uint)Marshal.SizeOf(caps)));
                channels.Add(new Channel(caps.szPname, i));
            }
            outputs = channels.ToArray();

            channels = new List <Channel>();
            count    = Winmm.waveInGetNumDevs();
            for (int i = 0; i < count; ++i)
            {
                WAVEINCAPS caps = new WAVEINCAPS();
                MmException.CheckThrow(Winmm.waveInGetDevCaps(new IntPtr(i), ref caps, (uint)Marshal.SizeOf(caps)));
                channels.Add(new Channel(caps.szPname, i));
            }
            inputs = channels.ToArray();
        }
Ejemplo n.º 2
0
 public static extern MMRESULT waveInGetDevCaps(IntPtr hwo, ref WAVEINCAPS pwic, uint cbwoc);
Ejemplo n.º 3
0
 public static extern MMRESULT waveInGetDevCaps(IntPtr hwo, ref WAVEINCAPS pwic, uint cbwoc);