diff options
author | corey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-06-22 19:25:54 +0000 |
---|---|---|
committer | corey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-06-22 19:25:54 +0000 |
commit | 5eee4632d3e2bcf17a29483467d247c71c202e0d (patch) | |
tree | eb0082d5c073fa578fea8f5ec2055a65bc307732 | |
parent | 0d1180719195281b11199bc697a7c16e20e7b5d7 (diff) | |
download | mpv-5eee4632d3e2bcf17a29483467d247c71c202e0d.tar.bz2 mpv-5eee4632d3e2bcf17a29483467d247c71c202e0d.tar.xz |
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
-rw-r--r-- | help/help_mp-en.h | 4 | ||||
-rw-r--r-- | libao2/audio_out.c | 12 |
2 files changed, 16 insertions, 0 deletions
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]; |