- Fixed: The softsynths did not reset the tempo to its initial value when restarting a song.

SVN r3804 (trunk)
This commit is contained in:
Randy Heit 2012-08-04 02:14:32 +00:00
parent 26f9540d3c
commit 6e81216bbd

View file

@ -944,7 +944,13 @@ int MIDIStreamer::FillBuffer(int buffer_num, int max_events, DWORD max_time)
if (Restarting) if (Restarting)
{ {
Restarting = false; 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(); DoRestart();
} }
events = MakeEvents(events, max_event_p, max_time); events = MakeEvents(events, max_event_p, max_time);