summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-07-22 13:26:44 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-07-22 13:26:44 +0200
commit8f3ae72e9d1d3b1d00945169930bb8f78fc0567d (patch)
treed25aa7f6869510d3b7c7bbc576cc6afe019d799b
parentbd6046c37de262af7ddeb9a26b613c4488312ad0 (diff)
downloadvdr-8f3ae72e9d1d3b1d00945169930bb8f78fc0567d.tar.gz
vdr-8f3ae72e9d1d3b1d00945169930bb8f78fc0567d.tar.bz2
Fixed handling relative volume settings in the call to cStatus::MsgSetVolume()
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY2
-rw-r--r--device.c5
3 files changed, 9 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 05b8657e..45135287 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1940,3 +1940,7 @@ Antti Hartikainen <ami+vdr@ah.fi>
Patrick Maier <maierp@informatik.tu-muenchen.de>
for fixing handling network masks in the svdrphosts.conf file
+
+Norbert Wentz <norbert.wentz@online.de>
+ for reporting a bug in handling relative volume settings in the call to
+ cStatus::MsgSetVolume()
diff --git a/HISTORY b/HISTORY
index 530f0707..aa964c89 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4820,3 +4820,5 @@ Video Disk Recorder Revision History
after all other fixes, because a short text might become a description.
- Fixed handling network masks in the svdrphosts.conf file (thanks to Patrick
Maier).
+- Fixed handling relative volume settings in the call to cStatus::MsgSetVolume()
+ (reported by Norbert Wentz).
diff --git a/device.c b/device.c
index 25c09f6a..9b28ab29 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.131 2006/06/15 09:59:40 kls Exp $
+ * $Id: device.c 1.132 2006/07/22 13:18:34 kls Exp $
*/
#include "device.h"
@@ -776,9 +776,10 @@ void cDevice::SetAudioChannel(int AudioChannel)
void cDevice::SetVolume(int Volume, bool Absolute)
{
+ int OldVolume = volume;
volume = min(max(Absolute ? Volume : volume + Volume, 0), MAXVOLUME);
SetVolumeDevice(volume);
- cStatus::MsgSetVolume(volume, Absolute);
+ cStatus::MsgSetVolume(Absolute ? volume : volume - OldVolume, Absolute);
if (volume > 0) {
mute = false;
Audios.MuteAudio(mute);