Skip to content

Commit

Permalink
aplaymidi: Set event completely for tempo event
Browse files Browse the repository at this point in the history
After UMP support was added in b399fb8 ev.type setting was inadvertently
dropped in the code path handling tempo meta event.
This is causing tempo meta events to not be handled at all.
Moreover, snd_seq_ev_set_fixed is also missing so MIDI files with
variable events such as SYSEX before the tempo meta event usually are
causing a segfault.

Fixes: b399fb8 ("aplaymidi: Add UMP support")
Closes: #241
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
jkl1337 authored and tiwai committed Jan 8, 2024
1 parent 827905c commit 4cb3e3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions seq/aplaymidi/aplaymidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,8 @@ static void play_midi(void)
ev.time.tick = event->tick;
ev.dest = ports[event->port];
if (event->type == SND_SEQ_EVENT_TEMPO) {
snd_seq_ev_set_fixed(&ev);
ev.type = event->type;
ev.dest.client = SND_SEQ_CLIENT_SYSTEM;
ev.dest.port = SND_SEQ_PORT_SYSTEM_TIMER;
ev.data.queue.queue = queue;
Expand Down

0 comments on commit 4cb3e3a

Please sign in to comment.