# HG changeset patch # User arpi # Date 1041082791 0 # Node ID 54eac4cf587c9b25f4871b59771bb3be3de1bee9 # Parent bdb4d5f33cf5b01e4b173346ffbc1401573c0641 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 diff -r bdb4d5f33cf5 -r 54eac4cf587c Gui/cfg.c --- 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",>kAOSurround,CONF_TYPE_FLAG,0,0,1,NULL }, { "ao_extra_stereo",>kAOExtraStereo,CONF_TYPE_FLAG,0,0,1,NULL }, { "ao_extra_stereo_coefficient",>kAOExtraStereoMul,CONF_TYPE_FLOAT,CONF_RANGE,-10,10,NULL }, +#ifdef USE_OSS_AUDIO { "ao_oss_mixer",>kAOOSSMixer,CONF_TYPE_STRING,0,0,0,NULL }, { "ao_oss_device",>kAOOSSDevice,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 }, diff -r bdb4d5f33cf5 -r 54eac4cf587c Gui/cfg.h --- 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; diff -r bdb4d5f33cf5 -r 54eac4cf587c Gui/interface.c --- 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( >kEquChannels,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 ) { diff -r bdb4d5f33cf5 -r 54eac4cf587c Gui/mplayer/gtk/opts.h --- 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 +#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 ); diff -r bdb4d5f33cf5 -r 54eac4cf587c libmpdemux/audio_in.h --- 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 */