Code: Select all
if key == "m" then
love.audio.play(bgmusic)
end
However if I make any attempt to have a function available to stop the bgmusic, it will no longer start. For example if I simply add:
Code: Select all
if key == "n" then
love.audio.stop()
end
There is no other change being made to the code. The audio source is a .ogg and is set to "stream."
I do not understand why a condition that hasn't been met has some effect on the rest of the program.
Maybe there is a better function to manage by audio activity?