My code is more or less like this:
audio.reserveChannels(1); menuMusic = audio.loadStream("music.mp3"); function showMenu() --load menu graphics print("channel 1 playing", audio.isChannelPlaying(1)); if not audio.isChannelActive(1) then audio.play(menuMusic, {channel=1, loops=-1}); end end
Yet, every time showMenu is called, the “isChannelPlaying(1)” returns false. Since I just started coding this, there are no pause, stop or dispose anywhere on my code, only a fully working game without any audio.
The audio result, is that when I return to the menu, it “rewinds” one or two seconds, but continues playing normally.
So, what I am doing wrong here?