diff --git a/source/Makefile.mk b/source/Makefile.mk index 82aa9320c..ce8e25d7d 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -48,10 +48,11 @@ BUILD_CXX_FLAGS += -DVESTIGE_HEADER # -------------------------------------------------------------- +HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true) HAVE_OPENGL = $(shell pkg-config --exists gl && echo true) HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true) -HAVE_AF_DEPS = $(shell pkg-config --exists libavcodec libavformat libavutil sndfile && echo true) +HAVE_AF_DEPS = $(shell pkg-config --exists sndfile && echo true) HAVE_MF_DEPS = $(shell pkg-config --exists smf && echo true) HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml zlib && echo true) HAVE_ZYN_UI_DEPS = $(shell pkg-config --exists ntk ntk_images && echo true) diff --git a/source/backend/native/Makefile b/source/backend/native/Makefile index 5f1732ad1..307877da6 100644 --- a/source/backend/native/Makefile +++ b/source/backend/native/Makefile @@ -24,7 +24,11 @@ CARLA_CXX_FLAGS += -I../engine ifeq ($(HAVE_AF_DEPS),true) AF_C_FLAGS = $(BUILD_C_FLAGS) -AF_C_FLAGS += $(shell pkg-config --cflags libavcodec libavformat libavutil sndfile) +AF_C_FLAGS += $(shell pkg-config --cflags sndfile) +ifeq ($(HAVE_FFMPEG),true) +AF_C_FLAGS += -DHAVE_FFMPEG +AF_C_FLAGS += $(shell pkg-config --cflags libavcodec libavformat libavutil) +endif endif ifeq ($(HAVE_MF_DEPS),true) diff --git a/source/backend/native/audio_decoder/ad_ffmpeg.c b/source/backend/native/audio_decoder/ad_ffmpeg.c index e75cac60f..b54697b24 100644 --- a/source/backend/native/audio_decoder/ad_ffmpeg.c +++ b/source/backend/native/audio_decoder/ad_ffmpeg.c @@ -17,7 +17,6 @@ */ -#include "config.h" #include #include #include diff --git a/source/backend/native/audio_decoder/ad_plugin.c b/source/backend/native/audio_decoder/ad_plugin.c index 245a038a6..674293f4f 100644 --- a/source/backend/native/audio_decoder/ad_plugin.c +++ b/source/backend/native/audio_decoder/ad_plugin.c @@ -16,7 +16,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "config.h" #include #include #include diff --git a/source/backend/native/audio_decoder/ad_soundfile.c b/source/backend/native/audio_decoder/ad_soundfile.c index 0531f0a2f..b386dde38 100644 --- a/source/backend/native/audio_decoder/ad_soundfile.c +++ b/source/backend/native/audio_decoder/ad_soundfile.c @@ -16,7 +16,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "config.h" #include #include #include diff --git a/source/backend/native/audio_decoder/config.h b/source/backend/native/audio_decoder/config.h deleted file mode 100644 index c8ceb0b90..000000000 --- a/source/backend/native/audio_decoder/config.h +++ /dev/null @@ -1 +0,0 @@ -#define HAVE_FFMPEG 1 diff --git a/source/backend/native/audiofile.c b/source/backend/native/audiofile.c index 16252fe47..96b1a5353 100644 --- a/source/backend/native/audiofile.c +++ b/source/backend/native/audiofile.c @@ -307,7 +307,7 @@ static PluginHandle audiofile_instantiate(const PluginDescriptor* _this_, HostDe handlePtr->pool.size = 0; handlePtr->programs.current = 0; - handlePtr->loopMode = true; + handlePtr->loopMode = false; handlePtr->needsRead = false; handlePtr->doProcess = false; handlePtr->doQuit = true; @@ -388,7 +388,7 @@ static void audiofile_cleanup(PluginHandle handle) static uint32_t audiofile_get_parameter_count(PluginHandle handle) { - return 1; + return 0; // FIXME - loop mode needs work // unused (void)handle; @@ -396,6 +396,9 @@ static uint32_t audiofile_get_parameter_count(PluginHandle handle) static const Parameter* audiofile_get_parameter_info(PluginHandle handle, uint32_t index) { + // FIXME - loop mode needs work + return NULL; + if (index != 0) return NULL; @@ -421,6 +424,9 @@ static const Parameter* audiofile_get_parameter_info(PluginHandle handle, uint32 static float audiofile_get_parameter_value(PluginHandle handle, uint32_t index) { + // FIXME - loop mode needs work + return 0.0f; + AudioFileInstance* const handlePtr = (AudioFileInstance*)handle; if (index != 0) @@ -461,6 +467,9 @@ const MidiProgram* audiofile_get_program_info(PluginHandle handle, uint32_t inde static void audiofile_set_parameter_value(PluginHandle handle, uint32_t index, float value) { + // FIXME - loop mode needs work + return; + AudioFileInstance* const handlePtr = (AudioFileInstance*)handle; if (index != 0) diff --git a/source/backend/standalone/CarlaStandalone.cpp b/source/backend/standalone/CarlaStandalone.cpp index 383a9f045..ff1cc13b4 100644 --- a/source/backend/standalone/CarlaStandalone.cpp +++ b/source/backend/standalone/CarlaStandalone.cpp @@ -369,7 +369,10 @@ const char* carla_get_supported_file_types() // Files provided by internal plugins #ifdef WANT_AUDIOFILE - retText += "*.3g2;*.3gp;*.aac;*.ac3;*.aiff;*.amr;*.ape;*.flac;*.mp2;*.mp3;*.mpc;*.oga;*.ogg;*.w64;*.wav;*.wma;"; + retText += "*.aiff;*.flac;*.oga;*.ogg;*.w64;*.wav;"; +# ifdef HAVE_FFMPEG + retText += "*.3g2;*.3gp;*.aac;*.ac3;*.amr;*.ape;*.mp2;*.mp3;*.mpc;*.wma;"; +# endif #endif #ifdef WANT_MIDIFILE retText += ";*.mid;*.midi"; diff --git a/source/backend/standalone/Makefile b/source/backend/standalone/Makefile index 7c13c660d..cf9b34239 100644 --- a/source/backend/standalone/Makefile +++ b/source/backend/standalone/Makefile @@ -10,6 +10,10 @@ include ../Makefile.mk BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) -I../../theme +ifeq ($(HAVE_FFMPEG),true) +BUILD_CXX_FLAGS += -DHAVE_FFMPEG +endif + ifeq ($(HAVE_QT5),true) BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Widgets) else @@ -62,7 +66,10 @@ DGL_LIBS = -lX11 endif ifeq ($(HAVE_AF_DEPS),true) -LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil sndfile) +LINK_FLAGS += $(shell pkg-config --libs sndfile) +ifeq ($(HAVE_FFMPEG),true) +LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil) +endif endif ifeq ($(HAVE_MF_DEPS),true) diff --git a/source/bridges/Makefile b/source/bridges/Makefile index 98de372bd..996b15cc6 100644 --- a/source/bridges/Makefile +++ b/source/bridges/Makefile @@ -94,7 +94,11 @@ endif ifeq ($(HAVE_AF_DEPS),true) NATIVE_BUILD_FLAGS += -DWANT_AUDIOFILE -NATIVE_LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil sndfile) +NATIVE_LINK_FLAGS += $(shell pkg-config --libs sndfile) +ifeq ($(HAVE_FFMPEG),true) +NATIVE_BUILD_FLAGS += -DHAVE_FFMPEG +NATIVE_LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil) +endif endif ifeq ($(HAVE_MF_DEPS),true) diff --git a/source/includes/CarlaDefines.hpp b/source/includes/CarlaDefines.hpp index ad8965df2..2fa8021b0 100644 --- a/source/includes/CarlaDefines.hpp +++ b/source/includes/CarlaDefines.hpp @@ -46,7 +46,7 @@ # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 # define CARLA_PROPER_CPP11_SUPPORT # if (__GNUC__ * 100 + __GNUC_MINOR__) < 407 -# define override // gcc4.7+ +# define override // gcc4.7+ only # endif # endif #endif