diff --git a/help/help_mp-en.h b/help/help_mp-en.h index 9ab96535b7..bb01af1222 100644 --- a/help/help_mp-en.h +++ b/help/help_mp-en.h @@ -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" diff --git a/libao2/audio_out.c b/libao2/audio_out.c index c4f71cdf65..754e6a11f4 100644 --- a/libao2/audio_out.c +++ b/libao2/audio_out.c @@ -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];