aplay - Fix VU meter

Fix spaces displayed in VU meter to match with the actual max lengh (51).
This commit is contained in:
Takashi Iwai 2007-07-12 17:02:18 +02:00
parent 2fba9cd65e
commit 483d8d65d9

View file

@ -1215,10 +1215,10 @@ static void compute_max_peak(u_char *data, size_t count)
putchar('\r'); putchar('\r');
for (val = 0; val <= perc / 2 && val < 50; val++) for (val = 0; val <= perc / 2 && val < 50; val++)
putchar('#'); putchar('#');
for (; val < maxperc / 2 && val < 50; val++) for (; val <= maxperc / 2 && val < 50; val++)
putchar(' '); putchar(' ');
putchar('+'); putchar('+');
for (++val; val < 50; val++) for (++val; val <= 50; val++)
putchar(' '); putchar(' ');
printf("| %02i%%", maxperc); printf("| %02i%%", maxperc);