diff --git a/src/in_game_audio/InGameAudio.cs b/src/in_game_audio/InGameAudio.cs index 7612e94..f7e7966 100644 --- a/src/in_game_audio/InGameAudio.cs +++ b/src/in_game_audio/InGameAudio.cs @@ -72,11 +72,13 @@ public void OnExitTree() { public void StartMainMenuMusic() { GameMusic.FadeOut(); + MainMenuMusic.Stop(); MainMenuMusic.FadeIn(); } public void StartGameMusic() { MainMenuMusic.FadeOut(); + GameMusic.Stop(); GameMusic.FadeIn(); } } diff --git a/test/src/in_game_audio/InGameAudioTest.cs b/test/src/in_game_audio/InGameAudioTest.cs index 85a1415..af529e9 100644 --- a/test/src/in_game_audio/InGameAudioTest.cs +++ b/test/src/in_game_audio/InGameAudioTest.cs @@ -70,6 +70,7 @@ public void OnExitTree() { public void PlaysMainMenuMusic() { _logic.Setup(logic => logic.Start()); _gameMusic.Setup(music => music.FadeOut()); + _mainMenuMusic.Setup(music => music.Stop()); _mainMenuMusic.Setup(music => music.FadeIn()); _audio.OnResolved(); @@ -84,6 +85,7 @@ public void PlaysMainMenuMusic() { [Test] public void PlaysGameMusic() { _logic.Setup(logic => logic.Start()); + _gameMusic.Setup(music => music.Stop()); _gameMusic.Setup(music => music.FadeIn()); _mainMenuMusic.Setup(music => music.FadeOut());