Skip to content

Commit

Permalink
audio/alsa-utils: aplaymidi doesn't play at the proper tempo
Browse files Browse the repository at this point in the history
Add temporary patch to fix an issue with tempo events

aplaymidi does not process tempo events because the part
that handles tempo events was not rewritten sufficiently.
It may be executed as a different event in songs that
have tempo changes in the middle of the song.

A similar fix was submitted to upstream as
alsa-project/alsa-utils#241

PR:		275349
Reported by:	Tatsuki Makino <tatsuki_makino@hotmail.com>
  • Loading branch information
rosorio committed Nov 29, 2023
1 parent c3e950e commit f05f058
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions audio/alsa-utils/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PORTNAME= alsa-utils
PORTVERSION= 1.2.10
PORTREVISION= 1
CATEGORIES= audio
MASTER_SITES= https://www.alsa-project.org/files/pub/utils/

Expand Down
11 changes: 11 additions & 0 deletions audio/alsa-utils/files/patch-seq_aplaymidi_aplaymidi.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- seq/aplaymidi/aplaymidi.c.orig 2023-09-01 15:36:26 UTC
+++ seq/aplaymidi/aplaymidi.c
@@ -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;

0 comments on commit f05f058

Please sign in to comment.