mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Don't use default input/output device names when setting up an AudioDeviceManager if no channels have been requested
This commit is contained in:
parent
8de98f5a82
commit
8a66f1f3d3
1 changed files with 2 additions and 2 deletions
|
|
@ -336,10 +336,10 @@ void AudioDeviceManager::insertDefaultDeviceNames (AudioDeviceSetup& setup) cons
|
||||||
{
|
{
|
||||||
if (auto* type = getCurrentDeviceTypeObject())
|
if (auto* type = getCurrentDeviceTypeObject())
|
||||||
{
|
{
|
||||||
if (setup.outputDeviceName.isEmpty())
|
if (numOutputChansNeeded > 0 && setup.outputDeviceName.isEmpty())
|
||||||
setup.outputDeviceName = type->getDeviceNames (false) [type->getDefaultDeviceIndex (false)];
|
setup.outputDeviceName = type->getDeviceNames (false) [type->getDefaultDeviceIndex (false)];
|
||||||
|
|
||||||
if (setup.inputDeviceName.isEmpty())
|
if (numInputChansNeeded > 0 && setup.inputDeviceName.isEmpty())
|
||||||
setup.inputDeviceName = type->getDeviceNames (true) [type->getDefaultDeviceIndex (true)];
|
setup.inputDeviceName = type->getDeviceNames (true) [type->getDefaultDeviceIndex (true)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue