MelaM
Mela
Nov 22

Retain the Background Audio setting even after the app is killed.

Currently, in the Mela app, the Background Audio setting is turned off after the app is killed. This is by design, I didn't want users launching the app and forgetting they had the "Background Audio" setting on and then finding their iPad dead the next day because Mela was draining the battery all night. This remains a source of confusion to the Mela users, as I sometimes get an email telling me that it's a bug. I know a lot of users swipe out to kill apps routinely. But not everybody does. I don't for example. So, I propose a solution where Mela persists the Background Audio setting between the app kills. And instead, app engine automatically switches off its audio engine if it has been in the background for 10 minutes but hasn't received any MIDI input.
CompletedCompleted

Dec 8, 2022

Build 38 now retain the setting after the app restart.

Dec 6, 2022

tl;dr - not persisting that setting seems inconsistent with what I expect from other apps / standard-practice, so I'd definitely change that. That sort of sounds sensible... although maybe it could also potentially lead to a different kind of user confusion, I could see someone with a bunch of different devices playing with other stuff and then not knowing why Mela didn't respond when it finally started getting some MIDI... I don't know how likely this scenario really is, and obviously it's better to avoid complications in the interface, but I think you need to make it very explicit if that's what it's going to do, possibly have an extra option for how long before timeout. I know I have sometimes been caught out by forgetting synth apps are running in the background. Apps that use audio-input are easier to notice because you have the little orange indicator in the status bar. Normally I'll be running something like AUM but maybe have something like iMono/Poly that doesn't work as AU, so I know that when I kill AUM it's also time to kill anything associated with that session. Actually I guess it wouldn't be totally smooth or totally eliminate battery use, but I don't know how feasible it'd be to automatically re-enable audio when MIDI is received? Or how much energy would be used having the background audio stream open but not doing any processing? Anyway, I'm probably overthinking all this and your idea is fine.

Dec 6, 2022

Peter Todd: Thanks for your feedback. Regarding this point: > I don't know how feasible it'd be to automatically re-enable audio when MIDI is received. If this had been possible would have been amazing. But the only way for the app to know the MIDI is incoming is if it's running the audio engine. If the audio engine is off iOS suspends the app. Thinking about it more might be easiest to keep the setting persistent. It seems it's more upsetting to users that the setting is off after the restart than to have their batteries drained accidentally. Would be ideal if Apple sent users a message telling them that the app has been running in the background for a while and if they still want that to continue to happen. Like it does for location services.