Browse Source

ASIO: Ensured that the parameters to ASIO's getChannels callback are always initialised

tags/2021-05-28
hogliux 7 years ago
parent
commit
4ebfb32000
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      modules/juce_audio_devices/native/juce_win32_ASIO.cpp

+ 6
- 1
modules/juce_audio_devices/native/juce_win32_ASIO.cpp View File

@@ -787,9 +787,14 @@ private:
void reloadChannelNames() void reloadChannelNames()
{ {
long totalInChannels = 0, totalOutChannels = 0;
if (asioObject != nullptr if (asioObject != nullptr
&& asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans) == ASE_OK)
&& asioObject->getChannels (&totalInChannels, &totalOutChannels) == ASE_OK)
{ {
totalNumInputChans = totalInChannels;
totalNumOutputChans = totalOutChannels;
inputChannelNames.clear(); inputChannelNames.clear();
outputChannelNames.clear(); outputChannelNames.clear();


Loading…
Cancel
Save