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; }
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); }
private extern static int waveInGetDevCapsA(int uDeviceID, ref WAVEINCAPSA pwic, int cbwic);
private extern static int waveInGetDevCapsA(int uDeviceID,ref WAVEINCAPSA pwic,int cbwic);