aboutsummaryrefslogtreecommitdiffstats
path: root/src/volume.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-11 16:32:32 +0100
committerMax Kellermann <max@duempel.org>2008-11-11 16:32:32 +0100
commitedcd45df94bf69b78342943cd319d8ceb43ed6d1 (patch)
treed70e37392d8f51131563e16bf33668ba56f28d3e /src/volume.c
parentad77a3e0ace2bb082bc619de1c6d8732715e8977 (diff)
downloadmpd-edcd45df94bf69b78342943cd319d8ceb43ed6d1.tar.gz
mpd-edcd45df94bf69b78342943cd319d8ceb43ed6d1.tar.xz
mpd-edcd45df94bf69b78342943cd319d8ceb43ed6d1.zip
pcm_volume: added constant PCM_VOLUME_1
It may be desirable to change the range of integer volume levels (e.g. to 1024, which may utilize shifts instead of expensive integer divisions). Introduce the constant PCM_VOLUME_1 which describes the integer value for "100% volume". This is currently 1000.
Diffstat (limited to '')
-rw-r--r--src/volume.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/volume.c b/src/volume.c
index 8d497ed44..4b619f916 100644
--- a/src/volume.c
+++ b/src/volume.c
@@ -480,7 +480,7 @@ static int changeSoftwareVolume(int change, int rel)
/*new = 100.0*(exp(new/50.0)-1)/(M_E*M_E-1)+0.5; */
if (new >= 100)
- new = 1000;
+ new = PCM_VOLUME_1;
else if (new <= 0)
new = 0;
else