@@ -230,9 +230,11 @@ static const Ports master_ports = { | |||||
}; | }; | ||||
const Ports &Master::ports = master_ports; | const Ports &Master::ports = master_ports; | ||||
#ifndef PLUGINVERSION | |||||
//XXX HACKS | //XXX HACKS | ||||
Master *the_master; | Master *the_master; | ||||
rtosc::ThreadLink *the_bToU; | rtosc::ThreadLink *the_bToU; | ||||
#endif | |||||
class DataObj:public rtosc::RtData | class DataObj:public rtosc::RtData | ||||
{ | { | ||||
@@ -290,12 +292,14 @@ Master::Master(const SYNTH_T &synth_) | |||||
bToU = NULL; | bToU = NULL; | ||||
uToB = NULL; | uToB = NULL; | ||||
memory = new Allocator(); | memory = new Allocator(); | ||||
the_master = this; | |||||
swaplr = 0; | swaplr = 0; | ||||
off = 0; | off = 0; | ||||
smps = 0; | smps = 0; | ||||
bufl = new float[synth.buffersize]; | bufl = new float[synth.buffersize]; | ||||
bufr = new float[synth.buffersize]; | bufr = new float[synth.buffersize]; | ||||
#ifndef PLUGINVERSION | |||||
the_master = this; | |||||
#endif | |||||
fft = new FFTwrapper(synth.oscilsize); | fft = new FFTwrapper(synth.oscilsize); | ||||
@@ -319,6 +323,7 @@ Master::Master(const SYNTH_T &synth_) | |||||
defaults(); | defaults(); | ||||
#ifndef PLUGINVERSION | |||||
midi.event_cb = [](const char *m) | midi.event_cb = [](const char *m) | ||||
{ | { | ||||
char loc_buf[1024]; | char loc_buf[1024]; | ||||
@@ -327,6 +332,9 @@ Master::Master(const SYNTH_T &synth_) | |||||
//printf("sending an event to the owner of '%s'\n", m); | //printf("sending an event to the owner of '%s'\n", m); | ||||
Master::ports.dispatch(m+1, d); | Master::ports.dispatch(m+1, d); | ||||
}; | }; | ||||
#else | |||||
midi.event_cb = [](const char *) {}; | |||||
#endif | |||||
midi.error_cb = [](const char *a, const char *b) | midi.error_cb = [](const char *a, const char *b) | ||||
{ | { | ||||
@@ -37,7 +37,9 @@ | |||||
#include <err.h> | #include <err.h> | ||||
using std::string; | using std::string; | ||||
#ifndef PLUGINVERSION | |||||
extern rtosc::ThreadLink *the_bToU;//XXX | extern rtosc::ThreadLink *the_bToU;//XXX | ||||
#endif | |||||
/****************************************************************************** | /****************************************************************************** | ||||
* LIBLO And Reflection Code * | * LIBLO And Reflection Code * | ||||
@@ -846,7 +848,7 @@ MiddleWareImpl::MiddleWareImpl(MiddleWare *mw, SYNTH_T synth_, int prefered_port | |||||
lo_server_add_method(server, NULL, NULL, handler_function, mw); | lo_server_add_method(server, NULL, NULL, handler_function, mw); | ||||
fprintf(stderr, "lo server running on %d\n", lo_server_get_port(server)); | fprintf(stderr, "lo server running on %d\n", lo_server_get_port(server)); | ||||
#ifndef CARLA_VERSION_STRING | |||||
#ifndef PLUGINVERSION | |||||
clean_up_tmp_nams(); | clean_up_tmp_nams(); | ||||
create_tmp_file((unsigned)lo_server_get_port(server)); | create_tmp_file((unsigned)lo_server_get_port(server)); | ||||
#endif | #endif | ||||
@@ -856,7 +858,9 @@ MiddleWareImpl::MiddleWareImpl(MiddleWare *mw, SYNTH_T synth_, int prefered_port | |||||
idle = 0; | idle = 0; | ||||
idle_ptr = 0; | idle_ptr = 0; | ||||
#ifndef PLUGINVERSION | |||||
the_bToU = bToU; | the_bToU = bToU; | ||||
#endif | |||||
master = new Master(synth); | master = new Master(synth); | ||||
master->bToU = bToU; | master->bToU = bToU; | ||||
master->uToB = uToB; | master->uToB = uToB; | ||||
@@ -999,7 +1003,7 @@ void MiddleWareImpl::bToUhandle(const char *rtmsg, bool dummy) | |||||
broadcast = true; | broadcast = true; | ||||
} else if(broadcast) { | } else if(broadcast) { | ||||
broadcast = false; | broadcast = false; | ||||
#ifdef CARLA_VERSION_STRING | |||||
#ifdef PLUGINVERSION | |||||
if (!curr_url.empty()) // falktx: check added | if (!curr_url.empty()) // falktx: check added | ||||
cb(ui, rtmsg); | cb(ui, rtmsg); | ||||