Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Müller <nexyon@gmail.com>2021-03-17 00:32:16 +0300
committerJörg Müller <nexyon@gmail.com>2021-03-17 01:21:45 +0300
commit7b8fc307dc4ff608fc68e2decee45bae59f0c7c9 (patch)
tree9690b32b66aec4595df83e92f9595a819b715339
parent262a0988466e95ab31b834a6479b8be7ec1023d6 (diff)
Audaspace: porting minor improvements from upstream
- NullDevice is now called None - Automatic choice of best available device. - Minor formatting, documentation and cmake fixes.
-rw-r--r--CMakeLists.txt14
-rw-r--r--extern/audaspace/CMakeLists.txt10
-rw-r--r--extern/audaspace/bindings/C/AUD_Special.cpp2
-rw-r--r--extern/audaspace/plugins/jack/JackLibrary.h3
-rw-r--r--extern/audaspace/src/devices/NULLDevice.cpp2
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c2
-rw-r--r--source/creator/creator_args.c2
7 files changed, 14 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ddfce0a48d9..c0b9b28c610 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -305,6 +305,8 @@ if(NOT WIN32)
if(UNIX AND NOT APPLE)
option(WITH_JACK_DYNLOAD "Enable runtime dynamic JACK libraries loading" OFF)
endif()
+else()
+ set(WITH_JACK OFF)
endif()
if(UNIX AND NOT APPLE)
option(WITH_SDL_DYNLOAD "Enable runtime dynamic SDL libraries loading" OFF)
@@ -671,16 +673,8 @@ if(NOT WITH_BLENDER AND NOT WITH_CYCLES_STANDALONE)
)
endif()
-if(NOT WITH_AUDASPACE)
- if(WITH_OPENAL)
- message(WARNING "WITH_OPENAL requires WITH_AUDASPACE which is disabled")
- set(WITH_OPENAL OFF)
- endif()
- if(WITH_JACK)
- message(WARNING "WITH_JACK requires WITH_AUDASPACE which is disabled")
- set(WITH_JACK OFF)
- endif()
-endif()
+set_and_warn_dependency(WITH_AUDASPACE WITH_OPENAL OFF)
+set_and_warn_dependency(WITH_AUDASPACE WITH_JACK OFF)
if(NOT WITH_SDL AND WITH_GHOST_SDL)
message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL")
diff --git a/extern/audaspace/CMakeLists.txt b/extern/audaspace/CMakeLists.txt
index 84f5e8441c1..996d4b27911 100644
--- a/extern/audaspace/CMakeLists.txt
+++ b/extern/audaspace/CMakeLists.txt
@@ -380,16 +380,16 @@ if(WITH_C)
bindings/C/AUD_Types.h
)
-if(WITH_FFTW)
- list(APPEND C_SRC
+ if(WITH_FFTW)
+ list(APPEND C_SRC
bindings/C/AUD_HRTF.cpp
bindings/C/AUD_ImpulseResponse.cpp
- )
+ )
list(APPEND C_HDR
bindings/C/AUD_HRTF.h
bindings/C/AUD_ImpulseResponse.h
- )
+ )
endif()
if(NOT SEPARATE_C)
@@ -504,7 +504,7 @@ if(WITH_JACK)
plugins/jack/JackSymbols.h
)
- if(DYNLOAD_JACK)
+ if(DYNLOAD_JACK)
add_definitions(-DDYNLOAD_JACK)
endif()
diff --git a/extern/audaspace/bindings/C/AUD_Special.cpp b/extern/audaspace/bindings/C/AUD_Special.cpp
index a83465620ab..ac876a01eb3 100644
--- a/extern/audaspace/bindings/C/AUD_Special.cpp
+++ b/extern/audaspace/bindings/C/AUD_Special.cpp
@@ -376,7 +376,7 @@ AUD_API AUD_Device* AUD_init(const char* device, AUD_DeviceSpecs specs, int buff
{
try
{
- std::shared_ptr<IDeviceFactory> factory = DeviceManager::getDeviceFactory(device);
+ std::shared_ptr<IDeviceFactory> factory = device ? DeviceManager::getDeviceFactory(device) : DeviceManager::getDefaultDeviceFactory();
if(factory)
{
diff --git a/extern/audaspace/plugins/jack/JackLibrary.h b/extern/audaspace/plugins/jack/JackLibrary.h
index 4e210852702..533eca7272a 100644
--- a/extern/audaspace/plugins/jack/JackLibrary.h
+++ b/extern/audaspace/plugins/jack/JackLibrary.h
@@ -21,9 +21,8 @@
#endif
/**
- * @file JackDevice.h
+ * @file JackLibrary.h
* @ingroup plugin
- * The JackDevice class.
*/
#include "Audaspace.h"
diff --git a/extern/audaspace/src/devices/NULLDevice.cpp b/extern/audaspace/src/devices/NULLDevice.cpp
index c3290465563..fa8e457dbd2 100644
--- a/extern/audaspace/src/devices/NULLDevice.cpp
+++ b/extern/audaspace/src/devices/NULLDevice.cpp
@@ -187,7 +187,7 @@ public:
void NULLDevice::registerPlugin()
{
- DeviceManager::registerDevice("Null", std::shared_ptr<IDeviceFactory>(new NULLDeviceFactory));
+ DeviceManager::registerDevice("None", std::shared_ptr<IDeviceFactory>(new NULLDeviceFactory));
}
AUD_NAMESPACE_END
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 02a8951e60e..c95c8a6e44e 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -1619,7 +1619,7 @@ void WM_main_playanim(int argc, const char **argv)
AUD_initOnce();
- if (!(audio_device = AUD_init("OpenAL", specs, 1024, "Blender"))) {
+ if (!(audio_device = AUD_init(NULL, specs, 1024, "Blender"))) {
audio_device = AUD_init("Null", specs, 0, "Blender");
}
}
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 7316c1729f5..22a56165ab4 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"
- "'NULL' 'SDL' 'OPENAL' 'JACK'.";
+ "'None' 'SDL' 'OpenAL' 'JACK'.";
static int arg_handle_audio_set(int argc, const char **argv, void *UNUSED(data))
{
if (argc < 1) {