[SCM] calf/master: Make JACK host more independent of changes in plugin code.

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:40:04 UTC 2013


The following commit has been merged in the master branch:
commit d1fbc51f9dc5f55af17732189541fc3674f62180
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Sat Apr 10 23:24:24 2010 +0100

    Make JACK host more independent of changes in plugin code.
    
    This is not the best way to implement the independence, as it relies on
    linking a .so meant for dlopen, but it's a good start and should cut
    compile time a little bit.

diff --git a/src/Makefile.am b/src/Makefile.am
index 0526ad1..e00cf2a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,7 +10,7 @@ lv2dir = $(with_lv2_dir)/calf.lv2
 bin_PROGRAMS = 
 
 noinst_PROGRAMS = calfbenchmark
-noinst_LTLIBRARIES = calf.la libcalfstatic.la
+noinst_LTLIBRARIES = calf.la
 if USE_DSSI_GUI
 dssidir = $(with_dssi_dir)/calf
 dssi_PROGRAMS = calf_gtk
@@ -30,7 +30,7 @@ AM_CXXFLAGS += $(JACK_DEPS_CFLAGS)
 noinst_LTLIBRARIES += libcalfgui.la
 bin_PROGRAMS += calfjackhost 
 calfjackhost_SOURCES = host_session.cpp jack_client.cpp jackhost.cpp
-calfjackhost_LDADD = libcalfgui.la libcalfstatic.la $(JACK_DEPS_LIBS) $(GUI_DEPS_LIBS) $(FLUIDSYNTH_DEPS_LIBS)
+calfjackhost_LDADD = libcalfgui.la calf.la $(JACK_DEPS_LIBS) $(GUI_DEPS_LIBS) $(FLUIDSYNTH_DEPS_LIBS)
 if USE_LASH
 AM_CXXFLAGS += $(LASH_DEPS_CFLAGS)
 calfjackhost_LDADD += $(LASH_DEPS_LIBS)
@@ -40,14 +40,14 @@ endif
 AM_CXXFLAGS += $(GLIB_DEPS_CFLAGS)
 noinst_PROGRAMS += calfmakerdf
 calfmakerdf_SOURCES = makerdf.cpp 
-calfmakerdf_LDADD = libcalfstatic.la
+calfmakerdf_LDADD = calf.la
 
 calfbenchmark_SOURCES = benchmark.cpp
-calfbenchmark_LDADD = $(GLIB_DEPS_LIBS) libcalfstatic.la
+calfbenchmark_LDADD = $(GLIB_DEPS_LIBS) calf.la
 
 if USE_EXEC_GUI
 calf_gtk_SOURCES = dssigui.cpp
-calf_gtk_LDADD = libcalfstatic.la libcalfgui.la $(GLIB_DEPS_LIBS) $(GUI_DEPS_LIBS)
+calf_gtk_LDADD = calf.la libcalfgui.la $(GLIB_DEPS_LIBS) $(GUI_DEPS_LIBS)
 calfbenchmark_CXXFLAGS = $(AM_CXXFLAGS) -DTEST_OSC
 calfbenchmark_LDADD += libcalfgui.la
 endif
@@ -69,9 +69,6 @@ calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat -export-
 endif
 endif
 
-libcalfstatic_la_SOURCES = audio_fx.cpp modules.cpp modules_dsp.cpp fluidsynth.cpp giface.cpp monosynth.cpp organ.cpp osctl.cpp osctlnet.cpp preset.cpp synth.cpp utils.cpp wavetable.cpp modmatrix.cpp
-libcalfstatic_la_LDFLAGS = -static -lexpat -disable-shared  $(FLUIDSYNTH_DEPS_LIBS)
-
 if USE_GUI
 libcalfgui_la_SOURCES = gui.cpp gui_controls.cpp ctl_curve.cpp ctl_keyboard.cpp ctl_led.cpp preset_gui.cpp custom_ctl.cpp osctl.cpp osctlnet.cpp osctl_glib.cpp main_win.cpp utils.cpp
 libcalfgui_la_LDFLAGS = -static -disable-shared
diff --git a/src/calf/modules.h b/src/calf/modules.h
index f35ae23..0fbca1e 100644
--- a/src/calf/modules.h
+++ b/src/calf/modules.h
@@ -634,8 +634,6 @@ private:
     void adjust_gain_according_to_filter_mode(int velocity);
 };
 
-extern std::string get_builtin_modules_rdf();
-
 };
 
 #include "modules_synths.h"
diff --git a/src/jackhost.cpp b/src/jackhost.cpp
index f2f078a..462ff52 100644
--- a/src/jackhost.cpp
+++ b/src/jackhost.cpp
@@ -21,9 +21,6 @@
 #include <glade/glade.h>
 #include <jack/midiport.h>
 #include <calf/host_session.h>
-#include <calf/modules.h>
-#include <calf/modules_dev.h>
-#include <calf/organ.h>
 #include <calf/preset.h>
 #include <getopt.h>
 
@@ -33,10 +30,13 @@ using namespace calf_plugins;
 
 const char *client_name = "calfhost";
 
+extern "C" audio_module_iface *create_calf_plugin_by_name(const char *effect_name);
+
 jack_host *calf_plugins::create_jack_host(const char *effect_name, const std::string &instance_name, calf_plugins::progress_report_iface *priface)
 {
-    #define PER_MODULE_ITEM(name, isSynth, jackname) if (!strcasecmp(effect_name, jackname)) return new jack_host(new name##_audio_module, effect_name, instance_name, priface);
-    #include <calf/modulelist.h>
+    audio_module_iface *plugin = create_calf_plugin_by_name(effect_name);
+    if (plugin != NULL)
+        return new jack_host(plugin, effect_name, instance_name, priface);
     return NULL;
 }
 
diff --git a/src/plugin.cpp b/src/plugin.cpp
index 9069e6b..e37d6e7 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -493,3 +493,17 @@ const DSSI_Descriptor *dssi_descriptor(unsigned long Index)
 
 #endif
 
+#if USE_JACK
+
+extern "C" {
+
+audio_module_iface *create_calf_plugin_by_name(const char *effect_name)
+{
+    #define PER_MODULE_ITEM(name, isSynth, jackname) if (!strcasecmp(effect_name, jackname)) return new name##_audio_module;
+    #include <calf/modulelist.h>
+    return NULL;
+}
+
+}
+
+#endif

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list