mirror of https://github.com/mpv-player/mpv
Add verbose messages about trying and searching for audio output drivers.
Add messages showing why a specified audio output driver failed to be used. Based on a patch from Bryan Henderson, giraffedata [[]] gmail :: com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27123 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0d11807191
commit
5eee4632d3
|
@ -1153,6 +1153,10 @@ static char help_text[]=
|
|||
|
||||
// audio_out.c
|
||||
#define MSGTR_AO_ALSA9_1x_Removed "audio_out: alsa9 and alsa1x modules were removed, use -ao alsa instead.\n"
|
||||
#define MSGTR_AO_TryingPreferredAudioDriver "Trying preferred audio driver '%.*s', options '%s'\n"
|
||||
#define MSGTR_AO_NoSuchDriver "No such audio driver '%.*s'\n"
|
||||
#define MSGTR_AO_FailedInit "Failed to initialize audio driver '%s'\n"
|
||||
#define MSGTR_AO_TryingEveryKnown "Trying every known audio driver...\n"
|
||||
|
||||
// ao_oss.c
|
||||
#define MSGTR_AO_OSS_CantOpenMixer "[AO OSS] audio_setup: Can't open mixer device %s: %s\n"
|
||||
|
|
|
@ -134,14 +134,23 @@ const ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate
|
|||
}
|
||||
else
|
||||
ao_len = strlen(ao);
|
||||
|
||||
mp_msg(MSGT_AO, MSGL_V, MSGTR_AO_TryingPreferredAudioDriver,
|
||||
ao_len, ao, ao_subdevice ? ao_subdevice : "[none]");
|
||||
|
||||
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!
|
||||
else
|
||||
mp_msg(MSGT_AO, MSGL_WARN, MSGTR_AO_FailedInit, ao);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!audio_out_drivers[i]) // we searched through the entire list
|
||||
mp_msg(MSGT_AO, MSGL_WARN, MSGTR_AO_NoSuchDriver, ao_len, ao);
|
||||
// continue...
|
||||
++ao_list;
|
||||
if(!(ao_list[0])) return NULL; // do NOT fallback to others
|
||||
|
@ -150,6 +159,9 @@ const ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate
|
|||
free(ao_subdevice);
|
||||
ao_subdevice = NULL;
|
||||
}
|
||||
|
||||
mp_msg(MSGT_AO, MSGL_V, MSGTR_AO_TryingEveryKnown);
|
||||
|
||||
// now try the rest...
|
||||
for(i=0;audio_out_drivers[i];i++){
|
||||
const ao_functions_t* audio_out=audio_out_drivers[i];
|
||||
|
|
Loading…
Reference in New Issue