mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-24 12:36:16 -04:00
winmidi: Send "reset all controllers" when song loops (#878)
* winmidi: Fix songs with missing "hold pedal off" events * Revert "winmidi: Fix songs with missing "hold pedal off" events" This reverts commit a12e8e6a5a7c06236bc3f0e4d9abc03c19758f1e. * Send "reset all controllers" when song loops * Use consistent int type
This commit is contained in:
parent
77b5a3f6ef
commit
411d43b37b
@ -1082,6 +1082,10 @@ static void FillBuffer(void)
|
|||||||
}
|
}
|
||||||
else if (song.looping)
|
else if (song.looping)
|
||||||
{
|
{
|
||||||
|
for (i = 0; i < MIDI_CHANNELS_PER_TRACK; ++i)
|
||||||
|
{
|
||||||
|
SendShortMsg(0, MIDI_EVENT_CONTROLLER, i, MIDI_CONTROLLER_RESET_ALL_CTRLS, 0);
|
||||||
|
}
|
||||||
RestartTracks();
|
RestartTracks();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1398,8 +1402,8 @@ static void I_WIN_UnRegisterSong(void *handle)
|
|||||||
{
|
{
|
||||||
if (song.tracks)
|
if (song.tracks)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
for (i = 0; i < MIDI_NumTracks(song.file); ++i)
|
for (i = 0; i < song.num_tracks; ++i)
|
||||||
{
|
{
|
||||||
MIDI_FreeIterator(song.tracks[i].iter);
|
MIDI_FreeIterator(song.tracks[i].iter);
|
||||||
song.tracks[i].iter = NULL;
|
song.tracks[i].iter = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user