Hi,
It’s hard to give a direct answer here without knowing your setup, but it to my knowledge, Corona does not do anything to your music or audio when you change scenes. Somewhere in your code you likely have something that changes the audio or turns it off.
To switch off your audio, you can use the audio API, such as audio.stop (https://docs.coronalabs.com/api/library/audio/stop.html). You’ll need a way to check your options.lua, for example:
local options = require("options"); -- Done at initialization local myAudioHandle = audio.loadSound("mySound.wav"); local myChannel = nil; local function onTap(event) if event.phase == "began" then if options.isAudioEnabled == true then -- Notice that it checks your setting before playing myChannel = audio.play(myAudioHandle); end elseif event.phase == "ended" then audio.stop(myChannel); -- You can stop an active sound with audio.stop() end end local rect = display.newRect(display.contentCenterX, display.contentCenterY, 100, 100); rect:addEventListener("tap", onTap);
Hopefully that helps
Albert