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:
parent
61eafdb7ee
commit
550d61e487
1 changed files with 6 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue