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

AudioIODevice: Ensure CoreAudio device can be restarted after stopping

This commit is contained in:
reuk 2022-01-12 13:35:03 +00:00
parent 61eafdb7ee
commit 550d61e487
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -683,10 +683,14 @@ public:
{
const ScopedLock sl (callbackLock);
if (callback == nullptr && callbackToNotify != nullptr)
{
callback = callbackToNotify;
callback->audioDeviceAboutToStart (&owner);
}
if (! started)
{
callback = nullptr;
if (deviceID != 0)
{
if (OK (AudioDeviceCreateIOProcID (deviceID, audioIOProc, this, &audioProcID)))
@ -702,14 +706,6 @@ public:
}
}
}
if (started)
{
callback = callbackToNotify;
if (callback != nullptr)
callback->audioDeviceAboutToStart (&owner);
}
}
playing = started && callback != nullptr;