输入命令:alsamixer;
//设置系统音量,这个百分比会有一定的误差存在
amixer set Speaker 100%
//设置系统麦克风
amixer set Mic 100%
c++代码可以执行运行上面的命令:
QString yl = "amixer set Speaker 100%";
QByteArray cmd;
(yl); //也可以 ba2 = s2.toLatin1();
const char *c_cmd = ();
system(c_cmd);