Ubuntu - Alsa master volume

May 14, 2014 at 10:10pm
Hello,
I have been searching for some way to get system audio volume through c++ and I haven't found anything.
Do somebody know some easy way to get system volume ? even throught some file ?
May 14, 2014 at 11:55pm
Here's the ALSA library API: http://www.alsa-project.org/alsa-doc/alsa-lib/index.html

Also found this: http://stackoverflow.com/questions/6787318/set-alsa-master-volume-from-c-code

To get the system audio volume use snd_mixer_selem_get_playback_volume() instead.
May 15, 2014 at 9:59am
Thanks, snd_mixer_selem_get_playback_volume() work perfectly for me.
Topic archived. No new replies allowed.