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

Delete the current audio device when no inputs or outputs are specified in AudioDeviceManager::setAudioDeviceSetup() and ensure that the AudioDeviceSelectorComponent displays this correctly

This commit is contained in:
ed 2019-04-03 11:55:20 +01:00
parent 31f6f9993b
commit 4fa131f5a7
2 changed files with 6 additions and 6 deletions

View file

@ -463,10 +463,13 @@ String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup
{
jassert (&newSetup != &currentSetup); // this will have no effect
if (newSetup == currentSetup && currentAudioDevice != nullptr)
if (newSetup != currentSetup)
sendChangeMessage();
else if (currentAudioDevice != nullptr)
return {};
if (getCurrentDeviceTypeObject() == nullptr)
if (getCurrentDeviceTypeObject() == nullptr
|| (newSetup.inputDeviceName.isEmpty() && newSetup.outputDeviceName.isEmpty()))
{
deleteCurrentDevice();
@ -478,9 +481,6 @@ String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup
stopDevice();
if (newSetup != currentSetup)
sendChangeMessage();
String error;
if (currentSetup.inputDeviceName != newSetup.inputDeviceName