mirror of
https://github.com/mpv-player/mpv
synced 2025-01-13 00:06:25 +01:00
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> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8601 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3bf75ee497
commit
288868f16a
@ -36,8 +36,10 @@ int gtkAONorm = 0;
|
||||
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 @@ static config_t gui_opts[] =
|
||||
{ "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 },
|
||||
|
@ -13,9 +13,13 @@ extern int gtkAONorm;
|
||||
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;
|
||||
|
@ -163,8 +163,10 @@ void guiInit( void )
|
||||
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 @@ int guiGetEvent( int type,char * arg )
|
||||
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 )
|
||||
{
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -19,11 +19,13 @@ typedef struct {
|
||||
} 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 @@ typedef struct
|
||||
#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_init(audio_in_t *ai);
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user