From: Takashi Iwai Date: Sat, 20 Jul 2024 17:19:54 +0000 (+0200) Subject: aseqdump: Fix bogus velocity value output in UMP MIDI2 mode X-Git-Tag: v1.2.13~36 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=cdcfcddd95fbdd2af2ab9246b4b2d76f2572a694;p=alsa-utils.git aseqdump: Fix bogus velocity value output in UMP MIDI2 mode 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 --- diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c index 04901d6..6ac897c 100644 --- a/seq/aseqdump/aseqdump.c +++ b/seq/aseqdump/aseqdump.c @@ -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) {