cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
UNIX/Linux Programming
Ubuntu - Alsa master volume
Ubuntu - Alsa master volume
May 14, 2014 at 10:10pm UTC
QIZI94
(18)
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 UTC
norm b
(337)
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 UTC
QIZI94
(18)
Thanks, snd_mixer_selem_get_playback_volume() work perfectly for me.
Topic archived. No new replies allowed.