[alsa-devel] [PATCH] pcm: softvol: add support for S24_LE

Takashi Sakamoto o-takashi at sakamocchi.jp
Tue Sep 12 16:53:19 CEST 2017


Hi,

On 2017年09月12日 23:32, Takashi Iwai wrote:
> You can simply mask 0xffffff (or 0xffffff00, depending on CPU-native
> or not) to the int value instead of assigning / calculating each byte.
> And it's needed only when vol_scale !=0 && vol_scale != 0xffff.

Vumeter implementation of aplay in alsa-utils.git generates mask from 
return value of 'snd_pcm_format_silence[|_16|_32|_64]()'. I suppose this 
is also useful in your case.


Regards

Takashi Sakamoto


More information about the Alsa-devel mailing list