Hi all,
I’m having an odd problem regarding audio playback and Storyboard. In a given scene, I have background music playing, the volume level of which is adjustable by the user. This works fine. When you leave the scene to go to a different one, I call audio.stop, audio.dispose, and nil out the audio variables:
function scene:exitScene (e) audio.stop() audio.dispose(roomMusic\_A) audio.dispose(roomMusic\_B) roomMusic\_A = nil roomMusic\_B = nil end
When returning to the first scene, the music seems to not be playing. However, if you adjust the volume in the in-game Settings menu, the music can then be heard, and it has indeed been playing back.
Essentially the Settings menu is doing this:
audio.setVolume(musicVolume, {channel=musicChannel})
Why isn’t it audible until I set the volume again?
As a workaround, I wrote a small function that refreshes the volumes on all channels every time you enter a scene, but I’d like to understand what’s really going on.
Thanks!
- David