1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a bug attempting to open an audio device with zero channels

This commit is contained in:
Tom Poole 2019-02-06 10:38:32 +00:00
parent 52b86a0e0b
commit 7d13b82a10

View file

@ -524,6 +524,14 @@ String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup
currentSetup = newSetup;
if (inputChannels.isZero() && outputChannels.isZero())
{
if (treatAsChosenDevice)
updateXml();
return {};
}
currentSetup.sampleRate = chooseBestSampleRate (newSetup.sampleRate);
currentSetup.bufferSize = chooseBestBufferSize (newSetup.bufferSize);