]> git.alsa-project.org Git - alsa-utils.git/commitdiff
aseqdump: Fix bogus velocity value output in UMP MIDI2 mode
authorTakashi Iwai <tiwai@suse.de>
Sat, 20 Jul 2024 17:19:54 +0000 (19:19 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 20 Jul 2024 17:19:54 +0000 (19:19 +0200)
The printf format for a normalized velocity in MIDI2 mode had a typo,
resulting in a bogus value.  Fix it.

Fixes: 7e9bebad0b199 ("aseqdump: Add options to switch view mode")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
seq/aseqdump/aseqdump.c

index 04901d6187f7dad88e70bdcce22994001162d507..6ac897c0710a3cae07846985b5d4379ca6f3c81c 100644 (file)
@@ -442,7 +442,7 @@ static const char *midi2_velocity(unsigned int v)
                        snprintf(tmp, sizeof(tmp), "%.2f",
                                 ((double)v * 64.0) / 0x8000);
                else
-                       snprintf(tmp, sizeof(tmp), ".2%f",
+                       snprintf(tmp, sizeof(tmp), "%.2f",
                                 ((double)(v - 0x8000) * 63.0) / 0x7fff + 64.0);
                return tmp;
        } else if (view_mode == VIEW_PERCENT) {