summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-05-20 10:17:44 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-05-20 10:17:44 +0200
commita512b9a9fa24250ac16316916c5b015a15666b33 (patch)
tree8d6fea0adb2b615c6ebf72a54f5004daef7f2f63 /dvbdevice.c
parentc8c22ad49b0501f9e3c35ee79bc8bf94e05eba66 (diff)
downloadvdr-a512b9a9fa24250ac16316916c5b015a15666b33.tar.gz
vdr-a512b9a9fa24250ac16316916c5b015a15666b33.tar.bz2
Fixed handling Transfer Mode when replaying Dolby Digital audio and the option '-a' was given
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index db6a4476..6570695e 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.156 2006/04/01 14:19:43 kls Exp $
+ * $Id: dvbdevice.c 1.157 2006/05/20 09:52:23 kls Exp $
*/
#include "dvbdevice.h"
@@ -356,7 +356,12 @@ void cDvbTuner::Action(void)
// --- cDvbDevice ------------------------------------------------------------
int cDvbDevice::devVideoOffset = -1;
-bool cDvbDevice::setTransferModeForDolbyDigital = true;
+int cDvbDevice::setTransferModeForDolbyDigital = 1;
+#if APIVERSNUM == 10400
+int cDvbDevice__setTransferModeForDolbyDigital = -1;
+#else
+#warning ******* API version changed - remove old stuff
+#endif
cDvbDevice::cDvbDevice(int n)
{
@@ -653,7 +658,7 @@ eVideoSystem cDvbDevice::GetVideoSystem(void)
bool cDvbDevice::SetAudioBypass(bool On)
{
- if (!setTransferModeForDolbyDigital)
+ if (setTransferModeForDolbyDigital != 1)
return false;
return ioctl(fd_audio, AUDIO_SET_BYPASS_MODE, On) == 0;
}
@@ -914,10 +919,23 @@ void cDvbDevice::SetDigitalAudioDevice(bool On)
}
}
+#if APIVERSNUM == 10400
void cDvbDevice::SetTransferModeForDolbyDigital(bool On)
{
- setTransferModeForDolbyDigital = On;
+ if (cDvbDevice__setTransferModeForDolbyDigital >= 0) {
+ setTransferModeForDolbyDigital = cDvbDevice__setTransferModeForDolbyDigital;
+ cDvbDevice__setTransferModeForDolbyDigital = -1;
+ }
+ else
+ setTransferModeForDolbyDigital = On;
+}
+#else
+#warning ******* API version changed - remove old stuff
+void cDvbDevice::SetTransferModeForDolbyDigital(int Mode)
+{
+ setTransferModeForDolbyDigital = Mode;
}
+#endif
void cDvbDevice::SetAudioTrackDevice(eTrackType Type)
{
@@ -932,7 +950,7 @@ void cDvbDevice::SetAudioTrackDevice(eTrackType Type)
}
}
else if (IS_DOLBY_TRACK(Type)) {
- if (!setTransferModeForDolbyDigital)
+ if (setTransferModeForDolbyDigital == 0)
return;
// Currently this works only in Transfer Mode
ForceTransferMode();