From c0af83748f00ed48dbdc60ccf5d89e3fd7792f0c Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 20 Nov 2019 21:18:09 +0000 Subject: [PATCH] Fix build without audio file support Closes #962 Signed-off-by: falkTX --- source/includes/CarlaNativePrograms.hpp | 3 +-- source/native-plugins/audio-file.cpp | 4 ++++ source/plugin/carla-lv2.cpp | 2 ++ source/plugin/carla-vst.cpp | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/source/includes/CarlaNativePrograms.hpp b/source/includes/CarlaNativePrograms.hpp index da28b8a58..f6550b938 100644 --- a/source/includes/CarlaNativePrograms.hpp +++ b/source/includes/CarlaNativePrograms.hpp @@ -54,10 +54,9 @@ struct NativePluginPresetManager { NativePluginPresetManager(const char* const paths, const char* const wildcard) : filenames() { - CARLA_SAFE_ASSERT_RETURN(paths != nullptr,); CARLA_SAFE_ASSERT_RETURN(wildcard != nullptr,); - if (paths[0] == '\0' || wildcard[0] == '\0') + if (paths == nullptr || paths[0] == '\0' || wildcard[0] == '\0') return; const StringArray splitPaths(StringArray::fromTokens(paths, CARLA_OS_SPLIT_STR, "")); diff --git a/source/native-plugins/audio-file.cpp b/source/native-plugins/audio-file.cpp index d2587ae0d..a1b56b369 100644 --- a/source/native-plugins/audio-file.cpp +++ b/source/native-plugins/audio-file.cpp @@ -31,6 +31,10 @@ static const char* const audiofilesWildcard = "*.flac;*.oga;*.ogg;*.w64;*.wav;" # endif #endif +#if !defined(HAVE_SNDFILE) && !defined(HAVE_FFMPEG) +# warning sndfile and ffmpeg libraries missing, no audio file support will be available +"" +#endif ; // ----------------------------------------------------------------------- diff --git a/source/plugin/carla-lv2.cpp b/source/plugin/carla-lv2.cpp index f1f15fc37..0f3dfec1f 100644 --- a/source/plugin/carla-lv2.cpp +++ b/source/plugin/carla-lv2.cpp @@ -784,6 +784,8 @@ protected: case NATIVE_HOST_OPCODE_HOST_IDLE: case NATIVE_HOST_OPCODE_INTERNAL_PLUGIN: case NATIVE_HOST_OPCODE_QUEUE_INLINE_DISPLAY: + case NATIVE_HOST_OPCODE_REQUEST_IDLE: + case NATIVE_HOST_OPCODE_GET_FILE_PATH: // nothing break; diff --git a/source/plugin/carla-vst.cpp b/source/plugin/carla-vst.cpp index 6a2b5f762..ca041eb91 100644 --- a/source/plugin/carla-vst.cpp +++ b/source/plugin/carla-vst.cpp @@ -772,6 +772,8 @@ protected: case NATIVE_HOST_OPCODE_UI_UNAVAILABLE: case NATIVE_HOST_OPCODE_INTERNAL_PLUGIN: case NATIVE_HOST_OPCODE_QUEUE_INLINE_DISPLAY: + case NATIVE_HOST_OPCODE_REQUEST_IDLE: + case NATIVE_HOST_OPCODE_GET_FILE_PATH: // nothing break;