summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-02-06 12:31:36 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-02-06 12:31:36 +0100
commit20b213201a897e5a6d88fb889cc44865d07dfb57 (patch)
treec40c8d124517a81e38109ec707bb73fddd3d9ac3 /dvbdevice.c
parent506eb479a567ef00b4c2a332007ba3e03cbe21ef (diff)
downloadvdr-20b213201a897e5a6d88fb889cc44865d07dfb57.tar.gz
vdr-20b213201a897e5a6d88fb889cc44865d07dfb57.tar.bz2
Making sure the "Mute" and "Volume+/-" keys don't interfere with digital audio
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index e8862cb4..269c0a29 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.116 2005/01/16 12:05:13 kls Exp $
+ * $Id: dvbdevice.c 1.117 2005/02/06 12:30:14 kls Exp $
*/
#include "dvbdevice.h"
@@ -842,6 +842,8 @@ void cDvbDevice::SetAudioChannelDevice(int AudioChannel)
void cDvbDevice::SetVolumeDevice(int Volume)
{
if (HasDecoder()) {
+ if (digitalAudio)
+ Volume = 0;
audio_mixer_t am;
// conversion for linear volume response:
am.volume_left = am.volume_right = 2 * Volume - Volume * Volume / 255;
@@ -854,8 +856,8 @@ void cDvbDevice::SetDigitalAudioDevice(bool On)
if (digitalAudio != On) {
if (digitalAudio)
cCondWait::SleepMs(1000); // Wait until any leftover digital data has been flushed
- SetVolumeDevice(On || IsMute() ? 0 : CurrentVolume());
digitalAudio = On;
+ SetVolumeDevice(On || IsMute() ? 0 : CurrentVolume());
}
}