summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi_utils.h
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2014-03-09 20:13:36 -0300
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2014-03-11 16:37:02 -0300
commit58011810e5dad7c89a0123434fe9fe7cdaa26fac (patch)
treeb1dbde070bb38be44a8a32a10a558c30023234a7 /audio/out/ao_wasapi_utils.h
parentf3514fb4bdfa339d142e784a09555bbe25ff76f4 (diff)
downloadmpv-58011810e5dad7c89a0123434fe9fe7cdaa26fac.tar.bz2
mpv-58011810e5dad7c89a0123434fe9fe7cdaa26fac.tar.xz
ao_wasapi: Split into 2 files
ao_wasapi.c was almost entirely init code mixed with option code and occasionally actual audio handling code. Split most things to ao_wasapi_utils.c and keep the audio handling code in ao_wasapi.c.
Diffstat (limited to 'audio/out/ao_wasapi_utils.h')
-rwxr-xr-xaudio/out/ao_wasapi_utils.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/audio/out/ao_wasapi_utils.h b/audio/out/ao_wasapi_utils.h
new file mode 100755
index 0000000000..eb4b56556f
--- /dev/null
+++ b/audio/out/ao_wasapi_utils.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of mpv.
+ *
+ * Original author: Jonathan Yong <10walls@gmail.com>
+ *
+ * mpv is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * mpv is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MP_AO_WASAPI_UTILS_H_
+#define MP_AO_WASAPI_UTILS_H_
+
+#define COBJMACROS 1
+#define _WIN32_WINNT 0x600
+
+#include "audio/out/ao_wasapi.h"
+
+#include "options/m_option.h"
+#include "options/m_config.h"
+#include "audio/format.h"
+#include "common/msg.h"
+#include "misc/ring.h"
+#include "ao.h"
+#include "internal.h"
+#include "compat/atomics.h"
+#include "osdep/timer.h"
+
+int wasapi_fill_VistaBlob(wasapi_state *state);
+
+const char *wasapi_explain_err(const HRESULT hr);
+
+char* wasapi_get_device_name(IMMDevice *pDevice);
+char* wasapi_get_device_id(IMMDevice *pDevice);
+
+int wasapi_find_formats(struct ao *const ao);
+int wasapi_fix_format(struct wasapi_state *state);
+
+int wasapi_enumerate_devices(struct mp_log *log);
+
+HRESULT wasapi_find_and_load_device(struct ao *ao, IMMDevice **ppDevice,
+ char *search);
+
+int wasapi_validate_device(struct mp_log *log, const m_option_t *opt,
+ struct bstr name, struct bstr param);
+
+#endif \ No newline at end of file