Changed from selecting DAC0 to Master and adjusted the volume change amount from 20 to 13
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ public:
|
||||
|
||||
void dump()
|
||||
{
|
||||
system("amixer -c 1 get DAC0 > audio.txt");
|
||||
system("amixer -c 1 get Master > audio.txt");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ void DecreaseVolume::newVolume()
|
||||
}
|
||||
void DecreaseVolume::updateVolume()
|
||||
{
|
||||
std::string command = "amixer -c 1 set DAC0 ";
|
||||
std::string command = "amixer -c 1 set Master ";
|
||||
command.append(std::to_string(volume));
|
||||
system(command.c_str());
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ void IncreaseVolume::newVolume()
|
||||
}
|
||||
void IncreaseVolume::updateVolume()
|
||||
{
|
||||
std::string command = "amixer -c 1 set DAC0 ";
|
||||
std::string command = "amixer -c 1 set Master ";
|
||||
command.append(std::to_string(volume));
|
||||
system(command.c_str());
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ protected:
|
||||
short volume;
|
||||
unsigned short playBackOrigin = 0;
|
||||
unsigned short playBackEnd = 127;
|
||||
const unsigned short AFFECTAMOUNT = 20;
|
||||
const unsigned short AFFECTAMOUNT = 13;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
AudioVolume : AudioDump.h AudioInformation.cpp AudioInformation.h DecreaseVolume.cpp DecreaseVolume.h IncreaseVolume.cpp IncreaseVolume.h MainVolumeControl.cpp Volume.cpp Volume.h
|
||||
g++ AudioDump.h AudioInformation.cpp AudioInformation.h DecreaseVolume.cpp DecreaseVolume.h IncreaseVolume.cpp IncreaseVolume.h MainVolumeControl.cpp Volume.cpp Volume.h -o AudioVolume
|
||||
Reference in New Issue
Block a user