From cdcfcddd95fbdd2af2ab9246b4b2d76f2572a694 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sat, 20 Jul 2024 19:19:54 +0200 Subject: [PATCH] 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 --- seq/aseqdump/aseqdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {