From bc5798530663a9b3fec8df60feba510bd681c5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20M=C3=BCller?= Date: Thu, 11 Mar 2021 19:22:56 +0100 Subject: Audaspace: add support for WASAPI on Windows This adds WASAPI as audio backend on Windows. WASAPI is the modern standard audio API on Windows introduced with Windows Vista. Ref T86590 --- source/blender/python/intern/CMakeLists.txt | 4 ++++ source/blender/python/intern/bpy_app_build_options.c | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index 5991fa0ac8f..298491327e0 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -288,6 +288,10 @@ if(WITH_PULSEAUDIO) add_definitions(-DWITH_PULSEAUDIO) endif() +if(WITH_WASAPI) + add_definitions(-DWITH_WASAPI) +endif() + if(WITH_MOD_OCEANSIM) add_definitions(-DWITH_OCEANSIM) endif() diff --git a/source/blender/python/intern/bpy_app_build_options.c b/source/blender/python/intern/bpy_app_build_options.c index 68c654bc879..da5f46b9986 100644 --- a/source/blender/python/intern/bpy_app_build_options.c +++ b/source/blender/python/intern/bpy_app_build_options.c @@ -51,6 +51,7 @@ static PyStructSequence_Field app_builtopts_info_fields[] = { {"sdl_dynload", NULL}, {"jack", NULL}, {"pulseaudio", NULL}, + {"wasapi", NULL}, {"libmv", NULL}, {"mod_oceansim", NULL}, {"mod_remesh", NULL}, @@ -224,6 +225,12 @@ static PyObject *make_builtopts_info(void) SetObjIncref(Py_False); #endif +#ifdef WITH_WASAPI + SetObjIncref(Py_True); +#else + SetObjIncref(Py_False); +#endif + #ifdef WITH_LIBMV SetObjIncref(Py_True); #else -- cgit v1.2.3