Hi, I have music playing in the background and I’d like to have it fade out when the user exits the app on iOS. I see many games do this so would like to do the same with Corona. I’ve tried the following but it just cuts off instead of fading out:
– Handle system events
local function onSystemEvent(event)
if event.type == “applicationExit” then
audio.fadeOut() – fade out all audio channels
end
end
Runtime:addEventListener( “system”, onSystemEvent );
Has anyone tried this and gotten it to work or is this the wrong approach? I’m using the defaults to fadeOut() here but I’ve tried decreasing the delay from the default 1 second to 250ms but no difference. Any ideas?
[import]uid: 8692 topic_id: 11530 reply_id: 311530[/import]