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 <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2024-07-20 19:19:54 +02:00
parent 176c94591c
commit cdcfcddd95

View 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) {