diff options
author | Jörg Müller <nexyon@gmail.com> | 2021-03-11 21:22:56 +0300 |
---|---|---|
committer | Jörg Müller <nexyon@gmail.com> | 2021-03-17 01:21:45 +0300 |
commit | bc5798530663a9b3fec8df60feba510bd681c5ad (patch) | |
tree | 0d2587f7d3c5f9ac55d6bcee8f91afce9cf9d50b /source | |
parent | d33339ebf44855b62200a2784c046792d78c75bc (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/python/intern/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_app_build_options.c | 7 | ||||
-rw-r--r-- | source/creator/creator_args.c | 2 |
4 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 98447a29b6e..3069928cea7 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -306,6 +306,10 @@ if(WITH_PULSEAUDIO) add_definitions(-DWITH_PULSEAUDIO) endif() +if(WITH_WASAPI) + add_definitions(-DWITH_WASAPI) +endif() + if(WITH_OPENCOLLADA) add_definitions(-DWITH_COLLADA) endif() 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 diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index 6110f4172b1..562739642dd 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -1330,7 +1330,7 @@ static const char arg_handle_audio_set_doc[] = "\n\t" "Force sound system to a specific device." "\n\t" - "'None' 'SDL' 'OpenAL' 'JACK' 'PulseAudio'."; + "'None' 'SDL' 'OpenAL' 'JACK' 'PulseAudio' 'WASAPI'."; static int arg_handle_audio_set(int argc, const char **argv, void *UNUSED(data)) { if (argc < 1) { |