summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-11-30 17:44:59 +0100
committerwm4 <wm4@nowhere>2016-11-30 17:56:33 +0100
commitec74a79e1240eeda7b0bb195b484420052ea0ad8 (patch)
tree6956d1c2b864dc5068566c4b59f99053fce1f3b5 /audio/out/ao_wasapi.h
parent20f02229cd4263b350897bed1d4d2b18b6a51a25 (diff)
downloadmpv-ec74a79e1240eeda7b0bb195b484420052ea0ad8.tar.bz2
mpv-ec74a79e1240eeda7b0bb195b484420052ea0ad8.tar.xz
ao_wasapi: log return code when probing audio formats
We log a large number of formats, but we rarely log the result of the probing. Change this. The logic in try_format_exclusive() changes slightly, but should be equivalent. EXIT_ON_ERROR() checks for FAILED(), which should be exclusive to SUCCEEDED().
Diffstat (limited to 'audio/out/ao_wasapi.h')
-rw-r--r--audio/out/ao_wasapi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h
index ea9f5c2bad..65f16d11c1 100644
--- a/audio/out/ao_wasapi.h
+++ b/audio/out/ao_wasapi.h
@@ -50,6 +50,10 @@ void wasapi_change_uninit(struct ao* ao);
#define SAFE_RELEASE(unk, release) \
do { if ((unk) != NULL) { release; (unk) = NULL; } } while(0)
+#define mp_format_res_str(hres) \
+ (SUCCEEDED(hres) ? "ok" : ((hres) == AUDCLNT_E_UNSUPPORTED_FORMAT) \
+ ? "unsupported" : mp_HRESULT_to_str(hres))
+
enum wasapi_thread_state {
WASAPI_THREAD_FEED = 0,
WASAPI_THREAD_RESUME,