diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-07-30 15:58:36 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-07-30 15:58:36 +0000 |
commit | e5b67089c763989c5215f8603102415b3f8c3070 (patch) | |
tree | b633199bba862eeac66de0a8c91e1c4597c4f7d3 /Gui/interface.c | |
parent | c13550e85ad10ad6994c21115e5f492dc6e3ae76 (diff) | |
download | mpv-e5b67089c763989c5215f8603102415b3f8c3070.tar.bz2 mpv-e5b67089c763989c5215f8603102415b3f8c3070.tar.xz |
unified audio options dialog, fixes also bug #40
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12919 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/interface.c')
-rw-r--r-- | Gui/interface.c | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/Gui/interface.c b/Gui/interface.c index 07363e882c..4cc1811461 100644 --- a/Gui/interface.c +++ b/Gui/interface.c @@ -173,10 +173,6 @@ 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 @@ -797,19 +793,42 @@ int guiGetEvent( int type,char * arg ) 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 |