author | llornkcor <llornkcor> | 2002-05-23 01:59:47 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-05-23 01:59:47 (UTC) |
commit | ae177d167999f204a968ea21ae4a4a804d939e6d (patch) (unidiff) | |
tree | f73cde3f861b8016053d4cdfa5236e2394f45c97 | |
parent | b448fc3d97345bbc52ce79fb1901e0a610e9a55c (diff) | |
download | opie-ae177d167999f204a968ea21ae4a4a804d939e6d.zip opie-ae177d167999f204a968ea21ae4a4a804d939e6d.tar.gz opie-ae177d167999f204a968ea21ae4a4a804d939e6d.tar.bz2 |
make sound conform to sharps warped sense of conf
-rw-r--r-- | library/qpeapplication.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 5f61c0c..cf437da 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -169,16 +169,16 @@ static int muted=0; | |||
169 | static int micMuted=0; | 169 | static int micMuted=0; |
170 | 170 | ||
171 | static void setVolume(int t=0, int percent=-1) | 171 | static void setVolume(int t=0, int percent=-1) |
172 | { | 172 | { |
173 | switch (t) { | 173 | switch (t) { |
174 | case 0: { | 174 | case 0: { |
175 | Config cfg("Sound"); | 175 | Config cfg("qpe"); |
176 | cfg.setGroup("System"); | 176 | cfg.setGroup("Volume"); |
177 | if ( percent < 0 ) | 177 | if ( percent < 0 ) |
178 | percent = cfg.readNumEntry("Volume",50); | 178 | percent = cfg.readNumEntry("VolumePercent",50); |
179 | int fd = 0; | 179 | int fd = 0; |
180 | if ((fd = open("/dev/mixer", O_RDWR))>=0) { | 180 | if ((fd = open("/dev/mixer", O_RDWR))>=0) { |
181 | int vol = muted ? 0 : percent; | 181 | int vol = muted ? 0 : percent; |
182 | // set both channels to same volume | 182 | // set both channels to same volume |
183 | vol |= vol << 8; | 183 | vol |= vol << 8; |
184 | ioctl(fd, MIXER_WRITE(0), &vol); | 184 | ioctl(fd, MIXER_WRITE(0), &vol); |
@@ -189,14 +189,14 @@ static void setVolume(int t=0, int percent=-1) | |||
189 | } | 189 | } |
190 | 190 | ||
191 | static void setMic(int t=0, int percent=-1) | 191 | static void setMic(int t=0, int percent=-1) |
192 | { | 192 | { |
193 | switch (t) { | 193 | switch (t) { |
194 | case 0: { | 194 | case 0: { |
195 | Config cfg("Sound"); | 195 | Config cfg("qpe"); |
196 | cfg.setGroup("System"); | 196 | cfg.setGroup("Volume"); |
197 | if ( percent < 0 ) | 197 | if ( percent < 0 ) |
198 | percent = cfg.readNumEntry("Mic",50); | 198 | percent = cfg.readNumEntry("Mic",50); |
199 | 199 | ||
200 | int fd = 0; | 200 | int fd = 0; |
201 | int mic = micMuted ? 0 : percent; | 201 | int mic = micMuted ? 0 : percent; |
202 | if ((fd = open("/dev/mixer", O_RDWR))>=0) { | 202 | if ((fd = open("/dev/mixer", O_RDWR))>=0) { |