]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Changed the volume control resolution
authorChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2005 14:18:54 +0000 (14:18 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2005 14:18:54 +0000 (14:18 +0000)
audio.cc

index 80179efc90abd78985595e291fc0bbe1d5893805..174c5779829f7da3772eadc082fd0bd1a6974ef5 100644 (file)
--- a/audio.cc
+++ b/audio.cc
@@ -191,10 +191,14 @@ int Audio::reset()
 int Audio::setVolume(int volume)
 {
   // parameter: 0 for silence, 20 for full
-
   if ((volume < 0) || (volume > 20)) return 0;
 
-  volume = 2 * (20 - volume);
+// volume = 2 * (20 - volume);
+// Right, that one was rubbish... 0-10 were almost
+// inaudible, 11-20 did what should have been done
+// over the whole 0-20 range
+
+  volume = 20 - volume;
 
   unsigned long vol = (volume << 24) | (volume << 16);