From 0beb2ea6ecd0ba4e942efc99766e81eb03c39db1 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 14 Aug 2005 14:18:54 +0000 Subject: [PATCH] Changed the volume control resolution --- audio.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/audio.cc b/audio.cc index 80179ef..174c577 100644 --- 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); -- 2.39.2