diff --git a/source/audiolib/src/driver_winmm.cpp b/source/audiolib/src/driver_winmm.cpp index 58916e989..87a93b948 100644 --- a/source/audiolib/src/driver_winmm.cpp +++ b/source/audiolib/src/driver_winmm.cpp @@ -737,6 +737,8 @@ int WinMMDrv_MIDI_StartPlayback(void (*service)(void)) return WinMMErr_Error; } + midiLastDivision = 0; + return WinMMErr_Ok; } diff --git a/source/audiolib/src/midi.cpp b/source/audiolib/src/midi.cpp index 60ff56f66..c9be779af 100644 --- a/source/audiolib/src/midi.cpp +++ b/source/audiolib/src/midi.cpp @@ -776,12 +776,12 @@ int MIDI_PlaySong(char *song, int loopflag) _MIDI_Reset = FALSE; - MIDI_SetTempo(120); - // this can either stay like this, or I can add another field to the MIDI driver spec that holds the service callback if (SoundDriver_MIDI_StartPlayback(ASS_MIDISoundDriver == ASS_OPL3 ? _MIDI_ServiceMultivoc : _MIDI_ServiceRoutine) != MIDI_Ok) return MIDI_DriverError; + MIDI_SetTempo(120); + _MIDI_SongLoaded = TRUE; _MIDI_SongActive = TRUE;