[iOS] love.audio.mixwithsystem doesn't work correctly

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
orangeglo
Prole
Posts: 20
Joined: Mon Apr 16, 2018 6:44 pm

[iOS] love.audio.mixwithsystem doesn't work correctly

Post by orangeglo »

I'm developing a game for iOS. I'm having an issue where if I'm playing background music in a different app (spotify), then open my game, the music stops. If I keep my game open, resume the music, and switch back to the game, everything works correctly. The music and audio from my game mix perfectly. But from my understanding, the music shouldn't be paused on the game's startup with love.audio.mixwithsystem set to true.

I did some digging and discovered that to mix the audio on iOS, you need to set the audio session category to "AVAudioSessionCategoryAmbient". I checked the Love iOSsource code, and that's indeed what love.audio.mixwithsystem = true does. But it's not working as expected. My guess is this is a bug in the Love iOS source - maybe the audio subsystem is being initialized before the audio session is setup correctly?

Does anyone have any insight for me? Thanks in advance! :awesome:
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 55 guests