开发者

How to control master volume in linux/c++?

开发者 https://www.devze.com 2023-02-02 04:55 出处:网络
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 s

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消