12 Sep
2017
12 Sep
'17
4:53 p.m.
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