示例#1
0
		public static AudioDeviceCollection PlayBackDevices()
		{
			AudioDeviceCollection c=new AudioDeviceCollection();
			for(int i=0;i<waveOutGetNumDevs();i++)
			{
				WAVEOUTCAPSA a=new WAVEOUTCAPSA();
				waveOutGetDevCapsA(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 PlayBackDevices()
        {
            AudioDeviceCollection c = new AudioDeviceCollection();

            for (int i = 0; i < waveOutGetNumDevs(); i++)
            {
                WAVEOUTCAPSA a = new WAVEOUTCAPSA();
                waveOutGetDevCapsA(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 waveOutGetDevCapsA(int uDeviceID, ref WAVEOUTCAPSA pwoc, int cbwoc);
示例#4
0
		private extern static int waveOutGetDevCapsA(int uDeviceID,ref WAVEOUTCAPSA pwoc,int cbwoc);