From 6f40c211a50b6c39f17e28bef8478a84853b5c13 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Sat, 29 Jul 2017 13:31:25 -0700 Subject: ao_wasapi: reorganize wasapi.h Remove dead declarations. Move macro only used in wasapi_utils.c closer to use. Rearrange declaration order. --- audio/out/ao_wasapi.h | 16 ++++------------ audio/out/ao_wasapi_utils.c | 4 ++++ 2 files changed, 8 insertions(+), 12 deletions(-) (limited to 'audio') diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h index 82fa4eb419..3cf91f5418 100644 --- a/audio/out/ao_wasapi.h +++ b/audio/out/ao_wasapi.h @@ -45,15 +45,6 @@ typedef struct change_notify { HRESULT wasapi_change_init(struct ao* ao, bool is_hotplug); void wasapi_change_uninit(struct ao* ao); -#define EXIT_ON_ERROR(hres) \ - do { if (FAILED(hres)) { goto exit_label; } } while(0) -#define SAFE_DESTROY(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, @@ -113,11 +104,12 @@ void wasapi_list_devs(struct ao *ao, struct ao_device_list *list); bstr wasapi_get_specified_device_string(struct ao *ao); LPWSTR wasapi_find_deviceID(struct ao *ao); -void wasapi_dispatch(struct ao *ao); bool wasapi_thread_init(struct ao *ao); void wasapi_thread_uninit(struct ao *ao); -void wasapi_receive_proxies(wasapi_state *state); -void wasapi_release_proxies(wasapi_state *state); +#define EXIT_ON_ERROR(hres) \ + do { if (FAILED(hres)) { goto exit_label; } } while(0) +#define SAFE_DESTROY(unk, release) \ + do { if ((unk) != NULL) { release; (unk) = NULL; } } while(0) #endif diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index 7520f224e7..bedddd8302 100644 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -298,6 +298,10 @@ static bool set_ao_format(struct ao *ao, WAVEFORMATEX *wf, return true; } +#define mp_format_res_str(hres) \ + (SUCCEEDED(hres) ? "ok" : ((hres) == AUDCLNT_E_UNSUPPORTED_FORMAT) \ + ? "unsupported" : mp_HRESULT_to_str(hres)) + static bool try_format_exclusive(struct ao *ao, WAVEFORMATEXTENSIBLE *wformat) { struct wasapi_state *state = ao->priv; -- cgit v1.2.3