Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37757845
en ru br
ALT Linux repos
S:2.2.0-alt12
D:1.6.0-alt1
3.0: 1.3.15-alt1

Group :: Video
RPM: vdr

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: monoch.diff
Download


diff -uN vdr-1.1.32/device.c vdr-1.1.32-mc/device.c
--- vdr-1.1.32/device.c	2003-05-22 21:21:23.000000000 +0200
+++ vdr-1.1.32-mc/device.c	2003-05-22 21:01:31.000000000 +0200
@@ -472,6 +472,11 @@
      SetAudioTrackDevice(Index);
 }
+void cDevice::SetAudioChannel(audio_channel_select_t audio_channel_select)
+{
+  // Implementation in derived class
+}
+
 bool cDevice::CanReplay(void) const
 {
   return HasDecoder();
diff -uN vdr-1.1.32/device.h vdr-1.1.32-mc/device.h
--- vdr-1.1.32/device.h	2003-05-22 21:20:54.000000000 +0200
+++ vdr-1.1.32-mc/device.h	2003-05-22 20:59:23.000000000 +0200
@@ -13,6 +13,7 @@
 #include "ci.h"
 #include "thread.h"
 #include "tools.h"
+#include <linux/dvb/audio.h>
 #define MAXDEVICES         16 // the maximum number of devices in the system
 #define MAXCACAPS          16 // the maximum number of different CA values per device
@@ -301,6 +302,9 @@
        ///< Sets the current audio track to the given value, which should be within the
        ///< range of the list returned by a previous call to GetAudioTracks() (otherwise
        ///< nothing will happen).
+  virtual void SetAudioChannel(audio_channel_select_t audio_channel_select);
+       ///< Sets the current audio channel to either AUDIO_MONO_LEFT, AUDIO_MONO_RIGHT
+       ///< or AUDIO_STEREO.
 // Player facilities
diff -uN vdr-1.1.32/dvbdevice.c vdr-1.1.32-mc/dvbdevice.c
--- vdr-1.1.32/dvbdevice.c	2003-05-22 21:21:04.000000000 +0200
+++ vdr-1.1.32-mc/dvbdevice.c	2003-05-22 21:15:33.000000000 +0200
@@ -739,6 +739,21 @@
      }
 }
+void cDvbDevice::SetAudioChannel(audio_channel_select_t audio_channel_select)
+{
+   switch(audio_channel_select)
+   {  // Switch to ensure valid parameter
+   case AUDIO_STEREO:
+   case AUDIO_MONO_LEFT:
+   case AUDIO_MONO_RIGHT:
+      CHECK(ioctl(fd_audio, AUDIO_CHANNEL_SELECT, audio_channel_select));
+      break;
+   default:
+      esyslog("ERROR: cDvbDevice::SetAudioChannel() called with unknown parameter: %d", audio_channel_select);
+      break;
+   }
+}
+
 bool cDvbDevice::CanReplay(void) const
 {
 #ifndef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE
diff -uN vdr-1.1.32/dvbdevice.h vdr-1.1.32-mc/dvbdevice.h
--- vdr-1.1.32/dvbdevice.h	2003-05-22 21:21:16.000000000 +0200
+++ vdr-1.1.32-mc/dvbdevice.h	2003-05-22 21:12:35.000000000 +0200
@@ -90,6 +90,8 @@
   virtual int NumAudioTracksDevice(void) const;
   virtual const char **GetAudioTracksDevice(int *CurrentTrack = NULL) const;
   virtual void SetAudioTrackDevice(int Index);
+public:
+  virtual void SetAudioChannel(audio_channel_select_t audio_channel_select);
 // EIT facilities
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin