mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-01 03:10:06 +00:00
Moved iOS stream format changes to the message thread
This commit is contained in:
parent
9c75f13a4f
commit
d8504a6090
1 changed files with 16 additions and 8 deletions
|
|
@ -647,8 +647,8 @@ public:
|
|||
kAudioUnitScope_Global, 0, &connected, &dataSize);
|
||||
jassert (err == noErr);
|
||||
|
||||
JUCE_IOS_AUDIO_LOG ("handleInterAppAudioConnectionChange: " << connected ? "connected"
|
||||
: "disconnected");
|
||||
JUCE_IOS_AUDIO_LOG ("handleInterAppAudioConnectionChange: " << (connected ? "connected"
|
||||
: "disconnected"));
|
||||
|
||||
if (connected != owner.interAppAudioConnected)
|
||||
{
|
||||
|
|
@ -967,13 +967,21 @@ private:
|
|||
&dataSize);
|
||||
if (desc.mSampleRate != owner.getCurrentSampleRate())
|
||||
{
|
||||
owner.updateSampleRateAndAudioInput();
|
||||
const ScopedLock sl (callbackLock);
|
||||
if (owner.callback != nullptr)
|
||||
struct RouteChangeMessage : public CallbackMessage
|
||||
{
|
||||
owner.callback->audioDeviceStopped();
|
||||
owner.callback->audioDeviceAboutToStart (&owner);
|
||||
}
|
||||
RouteChangeMessage (iOSAudioIODevice& dev)
|
||||
: device (dev)
|
||||
{}
|
||||
|
||||
void messageCallback() override
|
||||
{
|
||||
device.handleRouteChange ("Stream format change");
|
||||
}
|
||||
|
||||
iOSAudioIODevice& device;
|
||||
};
|
||||
|
||||
(new RouteChangeMessage (owner))->post();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue