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 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel