From e26aa680aaf14a150eaadd448233cd6f6f9b17db Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 28 Jul 2024 10:36:44 +0200 Subject: [PATCH] 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 --- seq/aplaymidi2/aplaymidi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) {