From 12c08ceee3b034e360824969ea4e1aaed4be2daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20M=C3=BCller?= Date: Sun, 14 Mar 2021 12:46:47 +0100 Subject: Audaspace: add support for CoreAudio on macOS This adds CoreAudio as audio backend on macOS. CoreAudio is the standard audio API on macOS. Ref T86590 --- source/blender/makesrna/intern/CMakeLists.txt | 4 ++++ source/blender/python/intern/CMakeLists.txt | 4 ++++ source/blender/python/intern/bpy_app_build_options.c | 7 +++++++ 3 files changed, 15 insertions(+) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 3069928cea7..4fafa356879 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -298,6 +298,10 @@ if(WITH_OPENAL) add_definitions(-DWITH_OPENAL) endif() +if(WITH_COREAUDIO) + add_definitions(-DWITH_COREAUDIO) +endif() + if(WITH_JACK) add_definitions(-DWITH_JACK) endif() diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index 298491327e0..c7816aed3c1 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -280,6 +280,10 @@ if(WITH_JACK) add_definitions(-DWITH_JACK) endif() +if(WITH_COREAUDIO) + add_definitions(-DWITH_COREAUDIO) +endif() + if(WITH_LIBMV) add_definitions(-DWITH_LIBMV) endif() diff --git a/source/blender/python/intern/bpy_app_build_options.c b/source/blender/python/intern/bpy_app_build_options.c index da5f46b9986..f7b71c769d1 100644 --- a/source/blender/python/intern/bpy_app_build_options.c +++ b/source/blender/python/intern/bpy_app_build_options.c @@ -49,6 +49,7 @@ static PyStructSequence_Field app_builtopts_info_fields[] = { {"opensubdiv", NULL}, {"sdl", NULL}, {"sdl_dynload", NULL}, + {"coreaudio", NULL}, {"jack", NULL}, {"pulseaudio", NULL}, {"wasapi", NULL}, @@ -213,6 +214,12 @@ static PyObject *make_builtopts_info(void) SetObjIncref(Py_False); #endif +#ifdef WITH_COREAUDIO + SetObjIncref(Py_True); +#else + SetObjIncref(Py_False); +#endif + #ifdef WITH_JACK SetObjIncref(Py_True); #else -- cgit v1.2.3