summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2010-05-20 13:02:04 +0000
committerphintuka <phintuka>2010-05-20 13:02:04 +0000
commit38f0e6073966cfb0e2e470a03721cba7d8b5f059 (patch)
tree034b9eb7501f77c4007d9262aa021753a2b244e7
parent33c461e4f1080f367406bfa16399a761817175b8 (diff)
downloadxineliboutput-38f0e6073966cfb0e2e470a03721cba7d8b5f059.tar.gz
xineliboutput-38f0e6073966cfb0e2e470a03721cba7d8b5f059.tar.bz2
Make sure xine's internal copy of the mixer volume is initialized before using XINE_PARAM_AUDIO_MUTE.
This fixes mixer volume being reset at vdr-sxfe start when using software volume control. (Thanks to Juergen Lock)
-rw-r--r--xine_input_vdr.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c
index a8238cbf..11306fbd 100644
--- a/xine_input_vdr.c
+++ b/xine_input_vdr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_input_vdr.c,v 1.316 2010-05-12 10:45:00 phintuka Exp $
+ * $Id: xine_input_vdr.c,v 1.317 2010-05-20 13:02:04 phintuka Exp $
*
*/
@@ -134,7 +134,7 @@ typedef struct {
# include <linux/unistd.h> /* syscall(__NR_gettid) */
#endif
-static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.316 2010-05-12 10:45:00 phintuka Exp $";
+static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.317 2010-05-20 13:02:04 phintuka Exp $";
static const char log_module_input_vdr[] = "[input_vdr] ";
#define LOG_MODULENAME log_module_input_vdr
#define SysLogLevel iSysLogLevel
@@ -3100,6 +3100,15 @@ static int vdr_plugin_parse_control(vdr_input_plugin_if_t *this_if, const char *
if(sw != this->sw_volume_control) {
this->sw_volume_control = sw;
if(sw) {
+ /*
+ * XXX make sure libxine's internal copy of the mixer
+ * volume is initialized before using XINE_PARAM_AUDIO_MUTE...
+ * (this fixes mixer volume being reset to 45 here every time
+ * at vdr-sxfe start when using software volume control.)
+ */
+ tmp32 = xine_get_param(stream, XINE_PARAM_AUDIO_VOLUME);
+ xine_set_param(stream, XINE_PARAM_AUDIO_VOLUME, tmp32);
+
xine_set_param(stream, XINE_PARAM_AUDIO_MUTE, 0);
} else {
xine_set_param(stream, XINE_PARAM_AUDIO_AMP_LEVEL, 100);