Audaspace: porting minor improvements from upstream
- NullDevice is now called None - Automatic choice of best available device. - Minor formatting, documentation and cmake fixes.
This commit is contained in:
parent
262a098846
commit
7b8fc307dc
@ -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")
|
||||
|
10
extern/audaspace/CMakeLists.txt
vendored
10
extern/audaspace/CMakeLists.txt
vendored
@ -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()
|
||||
|
||||
|
2
extern/audaspace/bindings/C/AUD_Special.cpp
vendored
2
extern/audaspace/bindings/C/AUD_Special.cpp
vendored
@ -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)
|
||||
{
|
||||
|
3
extern/audaspace/plugins/jack/JackLibrary.h
vendored
3
extern/audaspace/plugins/jack/JackLibrary.h
vendored
@ -21,9 +21,8 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file JackDevice.h
|
||||
* @file JackLibrary.h
|
||||
* @ingroup plugin
|
||||
* The JackDevice class.
|
||||
*/
|
||||
|
||||
#include "Audaspace.h"
|
||||
|
2
extern/audaspace/src/devices/NULLDevice.cpp
vendored
2
extern/audaspace/src/devices/NULLDevice.cpp
vendored
@ -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
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user