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

ASIO: Read buffer size after setting device sample rate

This commit is contained in:
ed 2021-04-20 16:57:17 +01:00
parent 27af34af8b
commit b5c0c75a5b

View file

@ -415,11 +415,8 @@ public:
auto err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans);
jassert (err == ASE_OK);
bufferSizeSamples = readBufferSizes (bufferSizeSamples);
auto sampleRate = sr;
currentSampleRate = sampleRate;
currentBlockSizeSamples = bufferSizeSamples;
currentChansOut.clear();
currentChansIn.clear();
@ -441,6 +438,7 @@ public:
buffersCreated = false;
setSampleRate (sampleRate);
currentBlockSizeSamples = bufferSizeSamples = readBufferSizes (bufferSizeSamples);
// (need to get this again in case a sample rate change affected the channel count)
err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans);