I’m facing an issue where background audio (like YouTube or other apps) stops when I launch my app. How can I configure my app to prevent this from happening? I want the background audio (like YouTube or other synth apps) to continue playing while my JUCE app is running.
I have enabled background playing in the Projuer/Xcode
I tried JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS=0
But with no luck…
The only I can get it work when I manually set in the Juce sources:
Professional DAW users require full control over their audio environment - the use-case of enabling Youtube in the background is not appropriate in that situation.
If a professional wants to run audio over a Youtube sound-source, the usual approach is to export the Youtube data and insert it in the DAW as a mixable track.
As soon the JUCE app requests audio inputs background audio by other app would stop. That still would be the norm since most apps request audio inputs anyways when starting.
But right now it is not possible to opt out of this and audio by other apps is always interrupted when starting a JUCE app.
It seems there was a misunderstanding. I’m not developing a DAW application, and I don’t use one either. This is a regular GUI program where sound isn’t necessary, though it may handle MIDI messages.
The average user doesn’t require DAW functionality, they need just regular app, but they often ask why the audio stops when the app opens, or why background audio stops when using Command + Tab. This issue is critical for iOS users.
@aamf However, everything works fine when I set AVAudioSessionCategoryAmbient. That’s all we need.
@daniel Yeah, I tried that, but with no luck. In general, modifying JUCE source code during app publishing isn’t an issue for me. However, it would be great to have a setting for this through JUCE, either via compilation flags or during setAudioDevice. Unfortunately, I couldn’t find anything similar, and even ChatGPT couldn’t help.