0

Using NAudio & C# in a console application; the following code lists the ASIO drivers installed on my PC:

using System;
using NAudio.Wave;

code snippet:

        var asioDriverNames = AsioOut.GetDriverNames();

        foreach (string driverName in asioDriverNames)
        {
            Console.WriteLine(driverName);
        }

CMD> Result:

Audinate Dante PCIe ASIO Driver
MOTU Audio ASIO
OCTA-CAPTURE

I would like to determine the sample rate and bit depth support for each driver, though the bit depth support is the most important aspect at this time.

Also if there is any way to know which device is currently connected/driver running/active that would be amazing.

EDIT:

I should specify that I a looking for the incoming bit-depth of the audio stream for connected/active devices.

Majickal
  • 176
  • 2
  • 16

1 Answers1

1

I believe you could do something like the following:

AudioInputDevices audioDevice = new AudioInputDevices();
audioDevice.FriendlyName = device.FriendlyName;
audioDevice.DeviceFriendlyName = device.DeviceFriendlyName;
audioDevice.State = device.State.ToString();
audioDevice.SampleRate = device.AudioClient.MixFormat.SampleRate.ToString();

Hope this helps.

live2
  • 3,771
  • 2
  • 37
  • 46
Summit
  • 11
  • 1