Пример #1
0
 private void PopulateDeviceList()
 {
     foreach (AudioOutput output in AudioOutputs.GetDeviceList())
     {
         lstAudioDevices.Items.Add(output);
     }
 }
Пример #2
0
        static void Main(string[] args)
        {
            if (AudioOutputs.IsAsioSupported())
            {
                Console.WriteLine("Asio Outputs:");
                List <string> asioOutputs = AudioOutputs.GetAsioDriverNames();
                foreach (string output in asioOutputs)
                {
                    Console.WriteLine("\t" + output);
                }
            }

            if (AudioOutputs.IsDirectSoundSupported())
            {
                Console.WriteLine("Direct Sound Outputs:");
                List <string> dsOutputs = AudioOutputs.GetDirectSoundDriverNames();
                foreach (string output in dsOutputs)
                {
                    Console.WriteLine("\t" + output);
                }
            }

            if (AudioOutputs.IsWasapiSupported())
            {
                Console.WriteLine("Wasapi Outputs:");
                List <string> wOutputs = AudioOutputs.GetWasapiDeviceNames();
                foreach (string output in wOutputs)
                {
                    Console.WriteLine("\t" + output);
                }
            }

            if (AudioOutputs.IsWaveOutSupported())
            {
                Console.WriteLine("WaveOut Outputs:");
                List <string> woOutputs = AudioOutputs.GetWaveOutDeviceNames();
                foreach (string output in woOutputs)
                {
                    Console.WriteLine("\t" + output);
                }
            }


            Console.WriteLine("Press enter to exit");
            Console.ReadLine();
        }
Пример #3
0
 /// <summary>
 /// Constructor for WaveOut devices
 /// </summary>
 /// <param name="deviceType"></param>
 /// <param name="deviceName"></param>
 /// <param name="deviceNumber"></param>
 public AudioOutput(AudioOutputs.AudioDeviceType deviceType, string deviceName, int deviceNumber)
 {
     this.deviceType = deviceType;
     this.deviceName = deviceName;
     this.deviceNumber = deviceNumber;
 }
Пример #4
0
 /// <summary>
 /// Constructor for Wasapi devices
 /// </summary>
 /// <param name="deviceType"></param>
 /// <param name="deviceName"></param>
 /// <param name="mmDevice"></param>
 public AudioOutput(AudioOutputs.AudioDeviceType deviceType, string deviceName, NAJAudio.CoreAudioApi.MMDevice mmDevice)
 {
     this.deviceType = deviceType;
     this.deviceName = deviceName;
     this.mmDevice = mmDevice;
 }
Пример #5
0
 /// <summary>
 /// Constructor for Asio Devices
 /// </summary>
 /// <param name="deviceType"></param>
 /// <param name="deviceName"></param>
 public AudioOutput(AudioOutputs.AudioDeviceType deviceType, string deviceName)
 {
     this.deviceType = deviceType;
     this.deviceName = deviceName;
 }