OK, this is the solution I've found, also thanks to this post. Please Jules, do you confirm this is a safe way to do this?
I have added this to my app class header:
#if defined(JUCE_IOS) AudioDeviceManager f_AudioDeviceManager; AudioSourcePlayer f_FakeAudioSourcePlayer; #endif void suspended (); void resumed ();
and this to the implementation:
void App::initialize() { ... #if defined(JUCE_IOS) f_AudioDeviceManager.initialiseWithDefaultDevices(0, 1); #endif ... }
void App::shutdown() { ... #if defined(JUCE_IOS) f_AudioDeviceManager.removeAudioCallback(&f_FakeAudioSourcePlayer); #endif ... }
void App::suspended() { #if defined(JUCE_IOS) f_AudioDeviceManager.addAudioCallback(&f_FakeAudioSourcePlayer); #endif } void App::resumed() { #if defined(JUCE_IOS) f_AudioDeviceManager.removeAudioCallback(&f_FakeAudioSourcePlayer); #endif }