From d33339ebf44855b62200a2784c046792d78c75bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20M=C3=BCller?= Date: Tue, 2 Mar 2021 17:29:18 +0100 Subject: Audaspace: add support for PulseAudio on Linux This adds PulseAudio as audio backend on Linux. PulseAudio is the main audio engine used on most, if not all, Linux distributions today. 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 +++++++ source/creator/creator_args.c | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index c04ccf59327..98447a29b6e 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -302,6 +302,10 @@ if(WITH_JACK) add_definitions(-DWITH_JACK) endif() +if(WITH_PULSEAUDIO) + add_definitions(-DWITH_PULSEAUDIO) +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 56ef5c8187a..5991fa0ac8f 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -284,6 +284,10 @@ if(WITH_LIBMV) add_definitions(-DWITH_LIBMV) endif() +if(WITH_PULSEAUDIO) + add_definitions(-DWITH_PULSEAUDIO) +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 aaceb7b393f..68c654bc879 100644 --- a/source/blender/python/intern/bpy_app_build_options.c +++ b/source/blender/python/intern/bpy_app_build_options.c @@ -50,6 +50,7 @@ static PyStructSequence_Field app_builtopts_info_fields[] = { {"sdl", NULL}, {"sdl_dynload", NULL}, {"jack", NULL}, + {"pulseaudio", NULL}, {"libmv", NULL}, {"mod_oceansim", NULL}, {"mod_remesh", NULL}, @@ -217,6 +218,12 @@ static PyObject *make_builtopts_info(void) SetObjIncref(Py_False); #endif +#ifdef WITH_PULSEAUDIO + 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 22a56165ab4..6110f4172b1 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'."; + "'None' 'SDL' 'OpenAL' 'JACK' 'PulseAudio'."; static int arg_handle_audio_set(int argc, const char **argv, void *UNUSED(data)) { if (argc < 1) { -- cgit v1.2.3