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

CoreAudio: Ensure devices are restarted correctly after changing sample rate

f1b6bbc921 erroneously replaced

    callback = newCallback;
    previousCallback = callback;

with

    previousCallback = std::exchange (callback, newCallback);

It looks like previousCallback is intended to hold the last active
callback, so the previous version was correct after all.
This commit is contained in:
reuk 2022-02-16 13:43:13 +00:00
parent 409aaea43d
commit 1616c0ee26
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -1555,7 +1555,7 @@ public:
newCallback->audioDeviceAboutToStart (this);
const ScopedLock sl (callbackLock);
previousCallback = std::exchange (callback, newCallback);
previousCallback = callback = newCallback;
}
}