How to control master volume in linux/c++?
Specifically, I'm using Fedora 13 but I believe the code would be similar across any Gnome-ish flavor of Linux. I just need to be able to adjust the master volume using C++, and accomplish the exact same effect开发者_运维知识库 as if I had moved the slider up and down on the speaker icon in the "system tray." What's the best and easiest way to code this?
You just have to use the Alsa library. Or you could cheat and subprocess the amixer program.
精彩评论