diff options
author | Andreas Claesson <andreas.claesson@gmail.com> | 2005-05-26 06:09:55 +0000 |
---|---|---|
committer | Andreas Claesson <andreas.claesson@gmail.com> | 2005-05-26 06:09:55 +0000 |
commit | 2695e82bfa1b214251e33b49d55584b3e96eedfb (patch) | |
tree | fa571698a075f10c45c191cadeb89ed7e60c8c6c /src/volume.c | |
parent | af30dfbe847477360a1c86418a6f5a63aabdc8e4 (diff) | |
download | mpd-2695e82bfa1b214251e33b49d55584b3e96eedfb.tar.gz mpd-2695e82bfa1b214251e33b49d55584b3e96eedfb.tar.xz mpd-2695e82bfa1b214251e33b49d55584b3e96eedfb.zip |
Optimizes to volume changing code...
git-svn-id: https://svn.musicpd.org/mpd/branches/ancl@3289 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/volume.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/volume.c b/src/volume.c index c16938042..b99bd9156 100644 --- a/src/volume.c +++ b/src/volume.c @@ -433,9 +433,9 @@ int changeSoftwareVolume(FILE * fp, int change, int rel) { volume_softwareSet = new; /*new = 100.0*(exp(new/50.0)-1)/(M_E*M_E-1)+0.5;*/ - if(new>=100) new = 1000; + if(new>=100) new = 1024; else if(new<=0) new = 0; - else new = 1000.0*(exp(new/25.0)-1)/(54.5981500331F-1)+0.5; + else new = 1024.0*(exp(new/25.0)-1)/(54.5981500331F-1)+0.5; setPlayerSoftwareVolume(new); |