Siri interruption makes my audio distorted


#1

We are not able to use some of the more standard ways of handling interruptions. I've registered an audio callback, and when Siri interrupts, the best way to keep her from crashing my app is to temporarily disable my audio device. The problem, though, is that when I restart the audio device, the audio is coming back very distorted. Is this an issue that you have come across when dealing with Siri?

 

//Stop the audio device during an interruption
void AudioModule::removeAudioCallback()
{
    m_deviceManager->removeAudioCallback(m_audioIO);
    m_deviceManager->closeAudioDevice();
}

//Restart the audio device after an interruption
void AudioModule::addAudioCallback()
{
    m_deviceManager->restartLastAudioDevice();
    m_deviceManager->addAudioCallback(m_audioIO);
}


#2

Well if something is crashing, surely the first thing to do would be to stop that happening..? Do you mean it's your own code, or juce code that's crashing?