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:
parent
01be101f41
commit
4cd95c1a66
1 changed files with 9 additions and 8 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue