Пример #1
0
		public static AudioDeviceCollection InputDevices()
		{
			AudioDeviceCollection c=new AudioDeviceCollection();
			for(int i=0;i<waveInGetNumDevs();i++)
			{
				WAVEINCAPSA a=new WAVEINCAPSA();
				waveInGetDevCapsA(i,ref a,System.Runtime.InteropServices.Marshal.SizeOf(typeof(WAVEINCAPSA)));
				AudioDevice b=new AudioDevice();
				b.dwFormats=a.dwFormats;
				b.szPname=a.szPname;
				b.wPid=a.wPid;
				b.wMid=a.wMid;
				b.vDriverVersion=a.vDriverVersion;
				b.wChannels=a.wChannels;
				b.wReserved1=a.wReserved1;
				c.Add(b);
			}
			return c;
		}
Пример #2
0
        public static AudioDeviceCollection InputDevices()
        {
            AudioDeviceCollection c = new AudioDeviceCollection();

            for (int i = 0; i < waveInGetNumDevs(); i++)
            {
                WAVEINCAPSA a = new WAVEINCAPSA();
                waveInGetDevCapsA(i, ref a, System.Runtime.InteropServices.Marshal.SizeOf(typeof(WAVEINCAPSA)));
                AudioDevice b = new AudioDevice();
                b.dwFormats      = a.dwFormats;
                b.szPname        = a.szPname;
                b.wPid           = a.wPid;
                b.wMid           = a.wMid;
                b.vDriverVersion = a.vDriverVersion;
                b.wChannels      = a.wChannels;
                b.wReserved1     = a.wReserved1;
                c.Add(b);
            }
            return(c);
        }
Пример #3
0
 private extern static int waveInGetDevCapsA(int uDeviceID, ref WAVEINCAPSA pwic, int cbwic);
Пример #4
0
		private extern static int waveInGetDevCapsA(int uDeviceID,ref WAVEINCAPSA pwic,int cbwic);