This repository has been archived on 2026-07-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
AudioControl/DecreaseVolume.cpp
T
amazing-username 2b3718f5fd Functioning
2017-04-09 19:10:28 -05:00

29 lines
469 B
C++

#include"stdio.h"
#include"stdlib.h"
#include"AudioInformation.h"
#include"DecreaseVolume.h"
DecreaseVolume::DecreaseVolume()
{
AudioInformation vol;
volume = vol.getVolume();
newVolume();
updateVolume();
updateTheCurrentVolume();
}
void DecreaseVolume::newVolume()
{
volume = volume - AFFECTAMOUNT;
}
void DecreaseVolume::updateVolume()
{
std::string command = "amixer -c 1 set DAC0 ";
command.append(std::to_string(volume));
system(command.c_str());
}