Browse Source

Ensure that audio device is always stopped before modifying in AudioDeviceManager::setAudioDeviceSetup()

tags/2021-05-28
ed 4 years ago
parent
commit
21e4522891
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp

+ 2
- 2
modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp View File

@@ -544,6 +544,8 @@ String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup
else if (currentAudioDevice != nullptr)
return {};
stopDevice();
if (getCurrentDeviceTypeObject() == nullptr
|| (newSetup.inputDeviceName.isEmpty() && newSetup.outputDeviceName.isEmpty()))
{
@@ -555,8 +557,6 @@ String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup
return {};
}
stopDevice();
String error;
if (currentSetup.inputDeviceName != newSetup.inputDeviceName


Loading…
Cancel
Save