Skip to content

Commit 37a66ea

Browse files
authored
fix: fix crash related to menu music not looping. (#762)
The music tracks were not set to play on looped mode for menus such as the character selection or home menu. This would cause the game to crash when the track had finished and the transition to another menu page caused the system to try and stop the currently playing song ( which was no longer playing ).
1 parent 4af6cca commit 37a66ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/audio.rs

+4
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ fn music_system(
105105
instance: music
106106
.play(song.inner.clone_weak())
107107
.linear_fade_in(MUSIC_FADE_DURATION)
108+
.looped()
108109
.handle(),
109110
idx: 0,
110111
};
@@ -122,6 +123,7 @@ fn music_system(
122123
music
123124
.play(game.music.character_screen.inner.clone_weak())
124125
.linear_fade_in(MUSIC_FADE_DURATION)
126+
.looped()
125127
.handle(),
126128
);
127129
}
@@ -136,6 +138,7 @@ fn music_system(
136138
music
137139
.play(game.music.title_screen.inner.clone_weak())
138140
.linear_fade_in(MUSIC_FADE_DURATION)
141+
.looped()
139142
.handle(),
140143
);
141144
}
@@ -150,6 +153,7 @@ fn music_system(
150153
music
151154
.play(game.music.credits.inner.clone_weak())
152155
.linear_fade_in(MUSIC_FADE_DURATION)
156+
.looped()
153157
.handle(),
154158
);
155159
}

0 commit comments

Comments
 (0)