diff --git a/src/sound/music_midistream.cpp b/src/sound/music_midistream.cpp index 08edc2961..ba0077903 100644 --- a/src/sound/music_midistream.cpp +++ b/src/sound/music_midistream.cpp @@ -944,7 +944,13 @@ int MIDIStreamer::FillBuffer(int buffer_num, int max_events, DWORD max_time) if (Restarting) { Restarting = false; - events = WriteStopNotes(events); // Stop all notes in case any were left hanging. + // Reset the tempo to the inital value. + events[0] = 0; // dwDeltaTime + events[1] = 0; // dwStreamID + events[2] = (MEVT_TEMPO << 24) | InitialTempo; // dwEvent + events += 3; + // Stop all notes in case any were left hanging. + events = WriteStopNotes(events); DoRestart(); } events = MakeEvents(events, max_event_p, max_time);