[alsa-devel] Changing volume of a single PCM channel

Andreas Falkenhahn andreas at airsoftsoftwair.de
Mon May 3 13:02:18 CEST 2010


how do I change the volume of single PCM channel with ALSA? I'm playing
multiple sounds at the same time by opening a new channel for every sound
using snd_pcm_open() and let PulseAudio do the mixing. Now assuming that I
have allocated four channels using snd_pcm_open()... now I'd like to
change the volume of the second channel, the other three channels' volume
should not be affected. How can I do this?

AFAICS, volume control is provided by the ALSA mixer interface but I don't
seem to figure out how to connect the mixer with my PCM channels opened
using snd_pcm_open().

Thanks for any help,


More information about the Alsa-devel mailing list