I’m currently working on a commandline project involving ASIO device drivers on a computer using a Dante device.
When initializing the AudioDeviceManager for the first time, juce has a default behavior of scanning for every audio device connected to the computer.
If another application is connected to the Dante Virtual Soundcard driver, that application’s connection to DVS breaks when juce tries to scan the Dante Virtual Soundcard driver for a list of devices. Ultimately, DVS seems to disconnect both JUCE and the other app from its driver.
This is reproducible by:
- using a Windows system that has Dante Virtual Soundcard installed
- Opening another app like Reaper or VB Matrix and using DVS as the audio device driver.
- opening the Audio Settings Demo on Windows, and switching to the ASIO Device type.
the other app will disconnect from DVS, and the Audio Settings Demo will show the selected device as “None”. DVS will appear at the top of the devices list in Audio Settings Device.
DVS seems to only allow one application to connect with its driver at a time, for security reasons.
We got around this issue of the juce device scan causing issues when it tries to scan the DVS driver by modifying the isBlackListedDriver() function in juce_ASIO_windows.cpp to include the Dante Virtual Soundcard driver name in the list of driver names to blacklist.
This change allows us to successfully open our preferred ASIO device without interfering with other apps that are still using the Dante Virtual Soundcard.
static bool isBlacklistedDriver (const String& driverName)
{
return driverName.startsWith ("ASIO DirectX Full Duplex") ||
driverName == "ASIO Multimedia Driver" ||
driverName.startsWith ("Dante Virtual Soundcard");;
}
If there is a preferred way to connect to an ASIO device on a system that has a Dante sound card or Dante Virtual Soundcard installed, please share! Modifying the JUCE code in this way seems like a code smell, even though the change was effective.
We haven’t figured out a preferred way to open the ASIO driver we need to open.
We attempted this approach demo’d by @reuk:
but didn’t have success until we added the change to isBlackListedDriver as explained above.
audioDeviceManager.setCurrentAudioDeviceType ("ASIO", true);
AudioDeviceManaqer::AudioDeviceSetup setup;
setup.inputDeviceName = setup.outputDeviceName = "VB-Matrix VASIO-8";
setup.inputChannels.setRange (0, 64, true);
setup.outputChannels.setRange (0, 64, true);
setup.useDefaultInputChannels = setup.useDefaultOutputChannels = false;
audioDeviceManager.setAudioDeviceSetup (setup, true);
