summaryrefslogtreecommitdiff
path: root/audio.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 /audio.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 'audio.c')
-rw-r--r--audio.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/audio.c b/audio.c
index 742c50b4..ad5725c6 100644
--- a/audio.c
+++ b/audio.c
@@ -4,11 +4,18 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: audio.c 1.3 2005/02/12 12:40:51 kls Exp $
+ * $Id: audio.c 1.4 2006/05/20 10:02:08 kls Exp $
*/
#include "audio.h"
-#include "stdlib.h"
+#include <stdlib.h>
+// TODO remove the following if APIVERSNUM > 10400
+#include "config.h"
+#if APIVERSNUM != 10400
+#warning ******* API version changed - remove old stuff
+#endif
+// TODO
+#include "dvbdevice.h"
// --- cAudio ----------------------------------------------------------------
@@ -61,6 +68,14 @@ void cExternalAudio::Play(const uchar *Data, int Length, uchar Id)
if (command && !mute) {
if (pipe || pipe.Open(command, "w")) {
if (0x80 <= Id && Id <= 0x87 || Id == 0xBD) { // AC3
+#if APIVERSNUM == 10400
+ extern int cDvbDevice__setTransferModeForDolbyDigital;
+ cDvbDevice__setTransferModeForDolbyDigital = 2;
+ cDvbDevice::SetTransferModeForDolbyDigital(false);
+#else
+#warning ******* API version changed - remove old stuff
+ cDvbDevice::SetTransferModeForDolbyDigital(2);
+#endif
int written = Data[8] + 9; // skips the PES header
if (Id != 0xBD)
written += 4; // skips AC3 bytes