ao: print error message when ao_open_live() fails

When ao_open_live() failed, MPD would ignore the error code in
"errno".  Make it print a meaningful error message.
This commit is contained in:
Max Kellermann 2008-11-25 16:18:06 +01:00
parent 423276a384
commit c570aa20fa

View File

@ -208,8 +208,10 @@ audioOutputAo_openDevice(void *data, struct audio_format *audio_format)
ad->device = ao_open_live(ad->driverId, &format, ad->options);
if (ad->device == NULL)
if (ad->device == NULL) {
audioOutputAo_error("Failed to open libao");
return false;
}
return true;
}