Commit c570aa20 authored by Max Kellermann's avatar Max Kellermann

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.
parent 423276a3
...@@ -208,8 +208,10 @@ audioOutputAo_openDevice(void *data, struct audio_format *audio_format) ...@@ -208,8 +208,10 @@ audioOutputAo_openDevice(void *data, struct audio_format *audio_format)
ad->device = ao_open_live(ad->driverId, &format, ad->options); 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 false;
}
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment