Music Volume Decreasing Between Scenes

I’ve just started adding music to my game but am coming across an issue.

When moving between the main menu scene and the level select scene (each which play different music) the volume decreases each time I restart the scene’s respective track upon re-entering it multiple times.

  • I have a sound file loaded via audio.loadStream();
  • Calling audio.play(music, {fadeIn = 750}); in scene:show() (did)
  • Calling audio.fadeOut{time = 750}; in scene:hide() (will)
  • Calling audio.stop(); in scene:hide() (did)
  • Calling audio.dispose(music); in scene:destroy()

Both scenes use the same system.

Any ideas as to how I can go about avoiding this?

Does this happen if you comment out the fadeOut command? Sounds like that might continue trying to fade down the volume after you’ve called .stop and .dispose, cancelling out some of the effects of the fadeIn command in the next scene.

Does this happen if you comment out the fadeOut command? Sounds like that might continue trying to fade down the volume after you’ve called .stop and .dispose, cancelling out some of the effects of the fadeIn command in the next scene.