From f05f058867c8cba577ff6c6f90631e9940e947db Mon Sep 17 00:00:00 2001 From: Rodrigo Osorio Date: Wed, 29 Nov 2023 21:44:12 +0100 Subject: [PATCH] audio/alsa-utils: aplaymidi doesn't play at the proper tempo 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 https://github.com/alsa-project/alsa-utils/issues/241 PR: 275349 Reported by: Tatsuki Makino --- audio/alsa-utils/Makefile | 1 + .../alsa-utils/files/patch-seq_aplaymidi_aplaymidi.c | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 audio/alsa-utils/files/patch-seq_aplaymidi_aplaymidi.c diff --git a/audio/alsa-utils/Makefile b/audio/alsa-utils/Makefile index 16ea4c0b46ba1..b4498f4cad3f2 100644 --- a/audio/alsa-utils/Makefile +++ b/audio/alsa-utils/Makefile @@ -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/ diff --git a/audio/alsa-utils/files/patch-seq_aplaymidi_aplaymidi.c b/audio/alsa-utils/files/patch-seq_aplaymidi_aplaymidi.c new file mode 100644 index 0000000000000..03c8217034553 --- /dev/null +++ b/audio/alsa-utils/files/patch-seq_aplaymidi_aplaymidi.c @@ -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;