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:
parent
52b86a0e0b
commit
7d13b82a10
1 changed files with 8 additions and 0 deletions
|
|
@ -524,6 +524,14 @@ String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup
|
||||||
|
|
||||||
currentSetup = newSetup;
|
currentSetup = newSetup;
|
||||||
|
|
||||||
|
if (inputChannels.isZero() && outputChannels.isZero())
|
||||||
|
{
|
||||||
|
if (treatAsChosenDevice)
|
||||||
|
updateXml();
|
||||||
|
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
currentSetup.sampleRate = chooseBestSampleRate (newSetup.sampleRate);
|
currentSetup.sampleRate = chooseBestSampleRate (newSetup.sampleRate);
|
||||||
currentSetup.bufferSize = chooseBestBufferSize (newSetup.bufferSize);
|
currentSetup.bufferSize = chooseBestBufferSize (newSetup.bufferSize);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue