From 31a4547187126464d2774c13452f5c50e6923417 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 11 Jan 2016 14:39:19 +0100 Subject: ao_wasapi: move out some utility functions Note that hresult_to_str() (coming from wasapi_explain_err()) is mostly wasapi-specific, but since HRESULT error codes are unique, it can be extended for any other use. --- audio/out/ao_wasapi.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'audio/out/ao_wasapi.h') diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h index cc7f0f6e8b..5ba2aa325c 100644 --- a/audio/out/ao_wasapi.h +++ b/audio/out/ao_wasapi.h @@ -30,6 +30,7 @@ #include "common/msg.h" #include "osdep/atomics.h" +#include "osdep/windows_utils.h" #include "internal.h" #include "ao.h" @@ -114,13 +115,8 @@ typedef struct wasapi_state { change_notify change; } wasapi_state; -char *mp_GUID_to_str_buf(char *buf, size_t buf_size, const GUID *guid); char *mp_PKEY_to_str_buf(char *buf, size_t buf_size, const PROPERTYKEY *pkey); -char *mp_HRESULT_to_str_buf(char *buf, size_t buf_size, HRESULT hr); -#define mp_GUID_to_str(guid) mp_GUID_to_str_buf((char[40]){0}, 40, (guid)) #define mp_PKEY_to_str(pkey) mp_PKEY_to_str_buf((char[42]){0}, 42, (pkey)) -#define mp_HRESULT_to_str(hr) mp_HRESULT_to_str_buf((char[60]){0}, 60, (hr)) -#define mp_LastError_to_str() mp_HRESULT_to_str(HRESULT_FROM_WIN32(GetLastError())) void wasapi_list_devs(struct ao *ao, struct ao_device_list *list); LPWSTR find_deviceID(struct ao *ao); -- cgit v1.2.3