mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 23:55:42 +01:00
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:
parent
176c94591c
commit
cdcfcddd95
1 changed files with 1 additions and 1 deletions
|
@ -442,7 +442,7 @@ static const char *midi2_velocity(unsigned int v)
|
||||||
snprintf(tmp, sizeof(tmp), "%.2f",
|
snprintf(tmp, sizeof(tmp), "%.2f",
|
||||||
((double)v * 64.0) / 0x8000);
|
((double)v * 64.0) / 0x8000);
|
||||||
else
|
else
|
||||||
snprintf(tmp, sizeof(tmp), ".2%f",
|
snprintf(tmp, sizeof(tmp), "%.2f",
|
||||||
((double)(v - 0x8000) * 63.0) / 0x7fff + 64.0);
|
((double)(v - 0x8000) * 63.0) / 0x7fff + 64.0);
|
||||||
return tmp;
|
return tmp;
|
||||||
} else if (view_mode == VIEW_PERCENT) {
|
} else if (view_mode == VIEW_PERCENT) {
|
||||||
|
|
Loading…
Reference in a new issue