]> git.alsa-project.org Git - alsa-utils.git/commit
aplay: fix VU meter for S24_LE etc formats
authorRicard Wanderlof <ricard.wanderlof@axis.com>
Tue, 15 Sep 2015 11:10:00 +0000 (13:10 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 23 Sep 2015 14:28:33 +0000 (16:28 +0200)
commitcd1bb5f4a72c7364b2756db357d752a73baefc9b
treee0a94cc0e811a3bfdf7a0163e35ce63bb1f5bf57
parent5f0fc49a3ab9e9a66eb7a74582829c21556506a1
aplay: fix VU meter for S24_LE etc formats

When recording or playing back audio in a format where the number of
significant bits is less than the physical width (e.g. S24_LE), the VU
meter code needs to consider the number of significant bits in the samples
rather than the physical sample width (e.g. 24 vs 32 bits). Otherwise the
resulting VU meter display will be far too low and it will just indicate
0% all the time.

Tested with a device supporting the S24_LE format.

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c