[Mplayer-cvslog] CVS: main/Gui cfg.c, 1.40, 1.41 cfg.h, 1.15, 1.16 interface.c, 1.95, 1.96

Reimar Döffinger CVS syncmail at mplayerhq.hu
Fri Jul 30 17:58:38 CEST 2004


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/Gui
In directory mail:/var2/tmp/cvs-serv13217/Gui

Modified Files:
	cfg.c cfg.h interface.c 
Log Message:
unified audio options dialog, fixes also bug #40


Index: cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- cfg.c	8 Nov 2003 00:26:44 -0000	1.40
+++ cfg.c	30 Jul 2004 15:58:36 -0000	1.41
@@ -38,8 +38,14 @@
 float  gtkAOExtraStereoMul = 1.0;
 #ifdef USE_OSS_AUDIO
 char * gtkAOOSSMixer;
+char * gtkAOOSSMixerChannel;
 char * gtkAOOSSDevice;
 #endif
+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
+char * gtkAOALSAMixer;
+char * gtkAOALSAMixerChannel;
+char * gtkAOALSADevice;
+#endif
 #ifdef HAVE_SDL
 char * gtkAOSDLDriver;
 #endif
@@ -110,8 +116,14 @@
  { "ao_extra_stereo_coefficient",&gtkAOExtraStereoMul,CONF_TYPE_FLOAT,CONF_RANGE,-10,10,NULL },
 #ifdef USE_OSS_AUDIO
  { "ao_oss_mixer",&gtkAOOSSMixer,CONF_TYPE_STRING,0,0,0,NULL },
+ { "ao_oss_mixer_channel",&gtkAOOSSMixerChannel,CONF_TYPE_STRING,0,0,0,NULL },
  { "ao_oss_device",&gtkAOOSSDevice,CONF_TYPE_STRING,0,0,0,NULL },
 #endif
+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
+ { "ao_alsa_mixer",&gtkAOALSAMixer,CONF_TYPE_STRING,0,0,0,NULL },
+ { "ao_alsa_mixer_channel",&gtkAOALSAMixerChannel,CONF_TYPE_STRING,0,0,0,NULL },
+ { "ao_alsa_device",&gtkAOALSADevice,CONF_TYPE_STRING,0,0,0,NULL },
+#endif
 #ifdef HAVE_SDL
  { "ao_sdl_subdriver",&gtkAOSDLDriver,CONF_TYPE_STRING,0,0,0,NULL },
 #endif

Index: cfg.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- cfg.h	20 Mar 2003 12:41:32 -0000	1.15
+++ cfg.h	30 Jul 2004 15:58:36 -0000	1.16
@@ -14,8 +14,14 @@
 extern float  gtkAOExtraStereoMul;
 #ifdef USE_OSS_AUDIO
 extern char * gtkAOOSSMixer;
+extern char * gtkAOOSSMixerChannel;
 extern char * gtkAOOSSDevice;
 #endif
+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
+extern char * gtkAOALSAMixer;
+extern char * gtkAOALSAMixerChannel;
+extern char * gtkAOALSADevice;
+#endif
 #ifdef HAVE_SDL
 extern char * gtkAOSDLDriver;
 #endif

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- interface.c	26 Jun 2004 13:26:10 -0000	1.95
+++ interface.c	30 Jul 2004 15:58:36 -0000	1.96
@@ -173,10 +173,6 @@
  guiIntfStruct.StreamType=-1;
 
  memset( &gtkEquChannels,0,sizeof( gtkEquChannels ) );
-#ifdef USE_OSS_AUDIO
- if ( !gtkAOOSSMixer ) gtkAOOSSMixer=strdup( PATH_DEV_MIXER );
- if ( !gtkAOOSSDevice ) gtkAOOSSDevice=strdup( PATH_DEV_DSP );
-#endif
 #ifdef HAVE_DXR3
  if ( !gtkDXR3Device ) gtkDXR3Device=strdup( "/dev/em8300-0" );
 #endif
@@ -797,19 +793,42 @@
 	  ao_plugin_cfg.pl_extrastereo_mul=gtkAOExtraStereoMul;
 	 }
 #ifdef USE_OSS_AUDIO
-	mixer_device=gstrdup( gtkAOOSSMixer );
-	if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) && gtkAOOSSDevice )
+	if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) )
 	 {
-	  char * tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 );
+	  char *tmp;
+	  mixer_device = gtkAOOSSMixer;
+	  mixer_channel = gtkAOOSSMixerChannel;
+	  if (gtkAOOSSDevice) {
+	  tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 );
 	  sprintf( tmp,"oss:%s",gtkAOOSSDevice );
+	  } else
+	    tmp = "oss";
+	  gaddlist( &audio_driver_list,tmp );
+	 }
+#endif
+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
+	if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"alsa",4 ) )
+	 {
+	  char *tmp;
+	  mixer_device = gtkAOALSAMixer;
+	  mixer_channel = gtkAOALSAMixerChannel;
+	  if (gtkAOALSADevice) {
+	    tmp = calloc( 1,strlen( gtkAOALSADevice ) + 14 );
+	    sprintf( tmp,"alsa:device=%s",gtkAOALSADevice );
+	  } else
+	    tmp = "alsa";
 	  gaddlist( &audio_driver_list,tmp );
 	 }
 #endif
 #ifdef HAVE_SDL
-	if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"sdl",3 ) && gtkAOSDLDriver )
+	if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"sdl",3 ) )
 	 {
-	  char * tmp = calloc( 1,strlen( gtkAOSDLDriver ) + 10 );
+	  char *tmp;
+	  if (gtkAOSDLDriver) {
+	  tmp = calloc( 1,strlen( gtkAOSDLDriver ) + 10 );
 	  sprintf( tmp,"sdl:%s",gtkAOSDLDriver );
+	  } else
+	    tmp = "sdl";
 	  gaddlist( &audio_driver_list,tmp );
 	 }
 #endif




More information about the MPlayer-cvslog mailing list