This project has moved and is read-only. For the latest updates, please go here.

Newbie Help With Multi Asio Devices

Sep 3, 2013 at 10:46 PM
Hi All,
I'm still trying to learn some basics with naudio.

I have a windows form with two comboboxes and I'm using the code from the naudio demo to populate my asio devices.
Sorry for the VB.
        Public Sub New()

            For Each device In NAudio.Wave.AsioOut.GetDriverNames()
            Next device
            If Me.comboBoxAsioDevice.Items.Count > 0 Then
                Me.comboBoxAsioDevice.SelectedIndex = 0
            End If

        End Sub
I've also figured out the way to display the channel names
        Private Sub comboBoxAsioDevice_SelectedIndexChanged(sender As Object, e As EventArgs) Handles comboBoxAsioDevice.SelectedIndexChanged

            Using asioOut As New AsioOut
                For i As Integer = 0 To asioOut.DriverOutputChannelCount - 1 Step +2
                    comboAsioChannel.Items.Add(String.Format("{0} / {1}", asioOut.AsioOutputChannelName(i), asioOut.AsioOutputChannelName(1 + i)))
            End Using
        End Sub
My question is that when I change the device in comboBoxAsioDevice, how can I get the channel names in my comboAsioChannel (comboBox2) for the selected device to change as well?

Any help would greatly be appreciated.
Thanks, Wyatt
Sep 4, 2013 at 11:12 AM
looks like the AsioOut you create is always for the default device. Use the constructor that takes a driver name or driver index.