diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2017-07-12 23:37:45 -0700 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2017-08-07 14:33:03 -0700 |
commit | bee602da8287ba1ccf80a44f7c826429927bfc54 (patch) | |
tree | 64fddfd0ac6289a4103d950ce7cfb5280febce71 /audio/out/ao_wasapi.h | |
parent | 61c8a147b5fef7337ba4e68673d521d5479e49e5 (diff) | |
download | mpv-bee602da8287ba1ccf80a44f7c826429927bfc54.tar.bz2 mpv-bee602da8287ba1ccf80a44f7c826429927bfc54.tar.xz |
ao_wasapi: return bool instead of HRESULT from thread_init
Any bad HRESULTs should have been printed already and lots of failure modes
don't have an HRESULT leading to awkward hr = E_FAIL business.
This also checks the exit status of GetBufferSize in the align hack. A final
fatal message is added if either of the retry hacks fail.
Diffstat (limited to 'audio/out/ao_wasapi.h')
-rw-r--r-- | audio/out/ao_wasapi.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h index 81c3d93386..82fa4eb419 100644 --- a/audio/out/ao_wasapi.h +++ b/audio/out/ao_wasapi.h @@ -64,8 +64,8 @@ enum wasapi_thread_state { typedef struct wasapi_state { struct mp_log *log; + bool init_ok; // status of init phase // Thread handles - HRESULT init_ret; // status of init phase HANDLE hInitDone; // set when init is complete in audio thread HANDLE hAudioThread; // the audio thread itself HANDLE hWake; // thread wakeup event @@ -114,7 +114,7 @@ bstr wasapi_get_specified_device_string(struct ao *ao); LPWSTR wasapi_find_deviceID(struct ao *ao); void wasapi_dispatch(struct ao *ao); -HRESULT wasapi_thread_init(struct ao *ao); +bool wasapi_thread_init(struct ao *ao); void wasapi_thread_uninit(struct ao *ao); void wasapi_receive_proxies(wasapi_state *state); |