]> git.alsa-project.org Git - alsa-utils.git/commitdiff
aplaymidi2: Use snd_ump_get_byte() helper
authorTakashi Iwai <tiwai@suse.de>
Sun, 28 Jul 2024 08:36:44 +0000 (10:36 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 28 Jul 2024 08:45:11 +0000 (10:45 +0200)
For simplifying code, use snd_ump_get_byte() to retrieve the meta text
data.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
seq/aplaymidi2/aplaymidi2.c

index f5dfdbd91f307de33a8c5e1ac061e05298586c20..f71958d1dcf9d34f560339646897d7fd788ececa 100644 (file)
@@ -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]) {