Browse Source

Fixed a crash when disabling all input or outputs when using DirectSound

tags/2021-05-28
Tom Poole 7 years ago
parent
commit
a253168a25
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      modules/juce_audio_devices/native/juce_win32_DirectSound.cpp

+ 2
- 4
modules/juce_audio_devices/native/juce_win32_DirectSound.cpp View File

@@ -908,8 +908,6 @@ private:
inChans.clear(); inChans.clear();
outChans.clear(); outChans.clear();
inputBuffers.setSize (1, 1);
outputBuffers.setSize (1, 1);
} }
void resync() void resync()
@@ -1111,7 +1109,7 @@ String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels,
enabledInputs.getHighestBit() + 1 - inChannels.size(), enabledInputs.getHighestBit() + 1 - inChannels.size(),
false); false);
inputBuffers.setSize (jmax (1, enabledInputs.countNumberOfSetBits()), bufferSizeSamples);
inputBuffers.setSize (enabledInputs.countNumberOfSetBits(), bufferSizeSamples);
inputBuffers.clear(); inputBuffers.clear();
int numIns = 0; int numIns = 0;
@@ -1132,7 +1130,7 @@ String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels,
enabledOutputs.getHighestBit() + 1 - outChannels.size(), enabledOutputs.getHighestBit() + 1 - outChannels.size(),
false); false);
outputBuffers.setSize (jmax (1, enabledOutputs.countNumberOfSetBits()), bufferSizeSamples);
outputBuffers.setSize (enabledOutputs.countNumberOfSetBits(), bufferSizeSamples);
outputBuffers.clear(); outputBuffers.clear();
int numOuts = 0; int numOuts = 0;


Loading…
Cancel
Save