1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

iOS audio interruptions now invoke an error callback to the audio device.

This commit is contained in:
jules 2012-09-26 20:16:42 +01:00
parent 01be101f41
commit 4cd95c1a66

View file

@ -374,20 +374,21 @@ private:
void interruptionListener (const UInt32 interruptionType)
{
/*if (interruptionType == kAudioSessionBeginInterruption)
if (interruptionType == kAudioSessionBeginInterruption)
{
isRunning = false;
AudioOutputUnitStop (audioUnit);
if (juce_iPhoneShowModalAlert ("Audio Interrupted",
"This could have been interrupted by another application or by unplugging a headset",
@"Resume",
@"Cancel"))
{
isRunning = true;
routingChanged (nullptr);
const ScopedLock sl (callbackLock);
if (callback != nullptr)
callback->audioDeviceError ("iOS audio session interruption");
}
}*/
isRunning = true;
routingChanged (nullptr);
}
if (interruptionType == kAudioSessionEndInterruption)
{