1
mirror of https://github.com/mpv-player/mpv synced 2024-09-09 01:16:56 +02:00

cosmetics: reindent, detabify

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26133 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2008-03-01 09:04:00 +00:00
parent 4485a60c38
commit a09376d67b

View File

@ -21,8 +21,8 @@ extern ao_functions_t audio_out_pulse;
extern ao_functions_t audio_out_jack;
extern ao_functions_t audio_out_openal;
extern ao_functions_t audio_out_null;
extern ao_functions_t audio_out_alsa5;
extern ao_functions_t audio_out_alsa;
extern ao_functions_t audio_out_alsa5;
extern ao_functions_t audio_out_alsa;
extern ao_functions_t audio_out_nas;
extern ao_functions_t audio_out_sdl;
extern ao_functions_t audio_out_sun;
@ -46,19 +46,19 @@ const ao_functions_t* const audio_out_drivers[] =
&audio_out_win32,
#endif
#ifdef MACOSX
&audio_out_macosx,
&audio_out_macosx,
#endif
#ifdef USE_OSS_AUDIO
&audio_out_oss,
#endif
#ifdef HAVE_ALSA1X
&audio_out_alsa,
&audio_out_alsa,
#endif
#ifdef HAVE_ALSA9
&audio_out_alsa,
&audio_out_alsa,
#endif
#ifdef HAVE_ALSA5
&audio_out_alsa5,
&audio_out_alsa5,
#endif
#ifdef USE_SGI_AUDIO
&audio_out_sgi,
@ -80,7 +80,7 @@ const ao_functions_t* const audio_out_drivers[] =
&audio_out_jack,
#endif
#ifdef HAVE_NAS
&audio_out_nas,
&audio_out_nas,
#endif
#ifdef HAVE_SDL
&audio_out_sdl,
@ -88,7 +88,7 @@ const ao_functions_t* const audio_out_drivers[] =
#ifdef USE_OPENAL
&audio_out_openal,
#endif
&audio_out_mpegpes,
&audio_out_mpegpes,
#ifdef HAVE_DXR2
&audio_out_dxr2,
#endif
@ -100,19 +100,19 @@ const ao_functions_t* const audio_out_drivers[] =
#endif
&audio_out_null,
// should not be auto-selected:
&audio_out_pcm,
NULL
&audio_out_pcm,
NULL
};
void list_audio_out(void){
int i=0;
mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AvailableAudioOutputDrivers);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_OUTPUTS\n");
while (audio_out_drivers[i]) {
int i=0;
mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AvailableAudioOutputDrivers);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_OUTPUTS\n");
while (audio_out_drivers[i]) {
const ao_info_t *info = audio_out_drivers[i++]->info;
mp_msg(MSGT_GLOBAL, MSGL_INFO,"\t%s\t%s\n", info->short_name, info->name);
}
mp_msg(MSGT_GLOBAL, MSGL_INFO,"\n");
mp_msg(MSGT_GLOBAL, MSGL_INFO,"\t%s\t%s\n", info->short_name, info->name);
}
mp_msg(MSGT_GLOBAL, MSGL_INFO,"\n");
}
const ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate,int channels,int format,int flags){
@ -123,42 +123,42 @@ const ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate
char* ao=ao_list[0];
int ao_len;
if (strncmp(ao, "alsa9", 5) == 0 || strncmp(ao, "alsa1x", 6) == 0) {
mp_msg(MSGT_AO, MSGL_FATAL, MSGTR_AO_ALSA9_1x_Removed);
exit_player(NULL);
mp_msg(MSGT_AO, MSGL_FATAL, MSGTR_AO_ALSA9_1x_Removed);
exit_player(NULL);
}
if (ao_subdevice) {
free(ao_subdevice);
ao_subdevice = NULL;
free(ao_subdevice);
ao_subdevice = NULL;
}
ao_subdevice=strchr(ao,':');
if(ao_subdevice){
ao_len = ao_subdevice - ao;
ao_subdevice = strdup(&ao[ao_len + 1]);
}
else
ao_len = strlen(ao);
for(i=0;audio_out_drivers[i];i++){
const ao_functions_t* audio_out=audio_out_drivers[i];
if(!strncmp(audio_out->info->short_name,ao,ao_len)){
// name matches, try it
if(audio_out->init(rate,channels,format,flags))
return audio_out; // success!
}
}
ao_subdevice=strchr(ao,':');
if(ao_subdevice){
ao_len = ao_subdevice - ao;
ao_subdevice = strdup(&ao[ao_len + 1]);
}
else
ao_len = strlen(ao);
for(i=0;audio_out_drivers[i];i++){
const ao_functions_t* audio_out=audio_out_drivers[i];
if(!strncmp(audio_out->info->short_name,ao,ao_len)){
// name matches, try it
if(audio_out->init(rate,channels,format,flags))
return audio_out; // success!
}
}
// continue...
++ao_list;
if(!(ao_list[0])) return NULL; // do NOT fallback to others
++ao_list;
if(!(ao_list[0])) return NULL; // do NOT fallback to others
}
if (ao_subdevice) {
free(ao_subdevice);
ao_subdevice = NULL;
free(ao_subdevice);
ao_subdevice = NULL;
}
// now try the rest...
for(i=0;audio_out_drivers[i];i++){
const ao_functions_t* audio_out=audio_out_drivers[i];
// if(audio_out->control(AOCONTROL_QUERY_FORMAT, (int)format) == CONTROL_TRUE)
if(audio_out->init(rate,channels,format,flags))
return audio_out; // success!
const ao_functions_t* audio_out=audio_out_drivers[i];
// if(audio_out->control(AOCONTROL_QUERY_FORMAT, (int)format) == CONTROL_TRUE)
if(audio_out->init(rate,channels,format,flags))
return audio_out; // success!
}
return NULL;
}