From: Takashi Iwai Date: Sun, 28 Jul 2024 08:36:44 +0000 (+0200) Subject: aplaymidi2: Use snd_ump_get_byte() helper X-Git-Tag: v1.2.13~18 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=e26aa680aaf14a150eaadd448233cd6f6f9b17db;p=alsa-utils.git aplaymidi2: Use snd_ump_get_byte() helper For simplifying code, use snd_ump_get_byte() to retrieve the meta text data. Signed-off-by: Takashi Iwai --- diff --git a/seq/aplaymidi2/aplaymidi2.c b/seq/aplaymidi2/aplaymidi2.c index f5dfdbd..f71958d 100644 --- a/seq/aplaymidi2/aplaymidi2.c +++ b/seq/aplaymidi2/aplaymidi2.c @@ -362,7 +362,7 @@ static void show_text(const uint32_t *ump) len = 0; for (i = 0; i < 12 && len < (int)sizeof(textbuf); i++) { - textbuf[len] = fh->meta.data[i / 4] >> ((3 - (i % 4)) * 8); + textbuf[len] = snd_ump_get_byte(ump, 4 + i); if (!textbuf[len]) break; switch (textbuf[len]) {