Browse Source

Tweaked ASIO device creation sequence to try to avoid breaking some flaky drivers.

tags/2021-05-28
jules 11 years ago
parent
commit
df4e055d02
2 changed files with 8 additions and 3 deletions
  1. +1
    -1
      modules/juce_audio_devices/juce_audio_devices.cpp
  2. +7
    -2
      modules/juce_audio_devices/native/juce_win32_ASIO.cpp

+ 1
- 1
modules/juce_audio_devices/juce_audio_devices.cpp View File

@@ -72,7 +72,7 @@
This means that anyone who wants to use JUCE's ASIO abilities will have to:
1) Agree to Steinberg's licensing terms and download the ASIO SDK
(see www.steinberg.net/Steinberg/Developers.asp).
(see http://www.steinberg.net/en/company/developers.html).
2) Enable this code with a global definition #define JUCE_ASIO 1.


+ 7
- 2
modules/juce_audio_devices/native/juce_win32_ASIO.cpp View File

@@ -438,8 +438,6 @@ public:
currentBlockSizeSamples = bufferSizeSamples;
currentChansOut.clear();
currentChansIn.clear();
inBuffers.clear (totalNumInputChans + 1);
outBuffers.clear (totalNumOutputChans + 1);
updateSampleRates();
@@ -458,6 +456,13 @@ public:
setSampleRate (sampleRate);
// (need to get this again in case a sample rate change affected the channel count)
err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans);
jassert (err == ASE_OK);
inBuffers.calloc (totalNumInputChans + 8);
outBuffers.calloc (totalNumOutputChans + 8);
if (needToReset)
{
JUCE_ASIO_LOG (" Resetting");


Loading…
Cancel
Save