changeset 8600:54eac4cf587c

Lots of functions and variables specific to OSS audio are used without ifdefs, so it is not possible to compile mplayer without enabling it, alse some are already ifdefed, so it is a mess. patch by Filip Kalinski <filon@pld.org.pl>
author arpi
date Sat, 28 Dec 2002 13:39:51 +0000
parents bdb4d5f33cf5
children 7fe391d6c293
files Gui/cfg.c Gui/cfg.h Gui/interface.c Gui/mplayer/gtk/opts.h libmpdemux/audio_in.h
diffstat 5 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/cfg.c	Sat Dec 28 13:37:18 2002 +0000
+++ b/Gui/cfg.c	Sat Dec 28 13:39:51 2002 +0000
@@ -36,8 +36,10 @@
 int    gtkAOSurround = 0;
 int    gtkAOExtraStereo = 0;
 float  gtkAOExtraStereoMul = 1.0;
+#ifdef USE_OSS_AUDIO
 char * gtkAOOSSMixer;
 char * gtkAOOSSDevice;
+#endif
 
 int    gtkCacheOn = 0;
 int    gtkCacheSize = 2048;
@@ -96,8 +98,10 @@
  { "ao_surround",&gtkAOSurround,CONF_TYPE_FLAG,0,0,1,NULL },
  { "ao_extra_stereo",&gtkAOExtraStereo,CONF_TYPE_FLAG,0,0,1,NULL },
  { "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_device",&gtkAOOSSDevice,CONF_TYPE_STRING,0,0,0,NULL },
+#endif
  
  { "osd_level",&osd_level,CONF_TYPE_INT,CONF_RANGE,0,2,NULL },
  { "sub_auto_load",&sub_auto,CONF_TYPE_FLAG,0,0,1,NULL },
--- a/Gui/cfg.h	Sat Dec 28 13:37:18 2002 +0000
+++ b/Gui/cfg.h	Sat Dec 28 13:39:51 2002 +0000
@@ -13,9 +13,13 @@
 extern int    gtkAOFakeSurround;
 extern int    gtkAOExtraStereo;
 extern float  gtkAOExtraStereoMul;
+#ifdef USE_OSS_AUDIO
 extern char * gtkAOOSSMixer;
 extern char * gtkAOOSSDevice;
+#endif
+#ifdef HAVE_DXR3
 extern char * gtkDXR3Device;
+#endif
 
 extern int    gtkCacheOn;
 extern int    gtkCacheSize;
--- a/Gui/interface.c	Sat Dec 28 13:37:18 2002 +0000
+++ b/Gui/interface.c	Sat Dec 28 13:39:51 2002 +0000
@@ -163,8 +163,10 @@
  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
@@ -691,6 +693,7 @@
 	  gset( &ao_plugin_cfg.plugin_list,"extrastereo" );
 	  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 )
 	 {
--- a/Gui/mplayer/gtk/opts.h	Sat Dec 28 13:37:18 2002 +0000
+++ b/Gui/mplayer/gtk/opts.h	Sat Dec 28 13:39:51 2002 +0000
@@ -4,12 +4,16 @@
 
 #include <gtk/gtk.h>
 
+#ifdef USE_OSS_AUDIO
 extern GtkWidget * OSSConfig;
+#endif
 extern GtkWidget * Preferences;
 extern GtkWidget * prEFontName;
 
 extern GtkWidget * create_Preferences( void );
+#ifdef USE_OSS_AUDIO
 extern GtkWidget * create_OSSConfig( void );
+#endif
 
 extern void ShowPreferences( void );
 
--- a/libmpdemux/audio_in.h	Sat Dec 28 13:37:18 2002 +0000
+++ b/libmpdemux/audio_in.h	Sat Dec 28 13:39:51 2002 +0000
@@ -19,11 +19,13 @@
 } ai_alsa_t;
 #endif
 
+#ifdef USE_OSS_AUDIO
 typedef struct {
     char *device;
 
     int audio_fd;
 } ai_oss_t;
+#endif
 
 typedef struct 
 {
@@ -44,7 +46,9 @@
 #ifdef HAVE_ALSA9
     ai_alsa_t alsa;
 #endif
+#ifdef USE_OSS_AUDIO
     ai_oss_t oss;
+#endif
 } audio_in_t;
 
 int audio_in_init(audio_in_t *ai, int type);
@@ -62,8 +66,10 @@
 int ai_alsa_xrun(audio_in_t *ai);
 #endif
 
+#ifdef USE_OSS_AUDIO
 int ai_oss_set_samplerate(audio_in_t *ai);
 int ai_oss_set_channels(audio_in_t *ai);
 int ai_oss_init(audio_in_t *ai);
+#endif
 
 #endif /* _audio_in_h */