No ASIO input until reselecting input channel

I’ve investigated a bit more with an Apollo Solo using the ASIO driver on Windows 11. The observed behaviour seems to be the product of several different aspects of the DemoRunner.

When I enable ASIO in the DemoRunner, the AudioDeviceSelectorComponent calls setCurrentAudioDeviceType on the AudioDeviceManager. In turn, this attempts to apply the last selected AudioDeviceSetup for an ASIO device. At this point, there is no previously-selected device, so a ‘blank’ setup is used, indicating that sensible defaults should be used. The defaults are taken from the values passed to AudioDeviceManager::initialise, which in the DemoRunner is 1 input and 2 output channels.

All of the above seems fairly reasonable to me. However, the UI in the DemoRunner is currently a bit misleading. The DemoRunner enables the “showChannelsAsStereoPairs” option when creating the AudioDeviceSelectorComponent, and this displays a given channel pair as “on” if either of the member channels is enabled. If I disable that option, then the DemoRunner shows only a single input as active by default. There’s definitely scope to improve the UI here, but this seems fairly specific to the AudioDeviceSelectorComponent.

It sounds like you’re not using the AudioDeviceSelectorComponent, so I guess the UX issue above doesn’t affect you. How are you initialising the AudioDeviceManager, and how are you specifying a channel layout? Are you enabling all channels after calling setCurrentAudioDeviceType to switch to the ASIO device type? Are you making sure not to use the default input/output arrangement?

FWIW if I run the AudioRecordingDemo on its own (outside of DemoRunner) with ASIO enabled, and put the following in the constructor, then the audio callbacks to the AudioLiveScrollingDisplay have 6 ins and 10 outs as expected (all channels available to the device), with input received correctly on channel 2.

audioDeviceManager.setCurrentAudioDeviceType ("ASIO", true);
AudioDeviceManaqer::AudioDeviceSetup setup;
setup.inputDeviceName = setup.outputDeviceName = "Universal Audio Thunderbolt";
setup.inputChannels.setRange (0, 64, true);
setup.outputChannels.setRange (0, 64, true);
setup.useDefaultInputChannels = setup.useDefaultOutputChannels = false;
audioDeviceManager.setAudioDeviceSetup (setup, true);