Browse Source

Disable some static vars in zyn code

tags/1.9.7
falkTX 9 years ago
parent
commit
57a5df1b80
2 changed files with 15 additions and 3 deletions
  1. +9
    -1
      source/native-plugins/zynaddsubfx/Misc/Master.cpp
  2. +6
    -2
      source/native-plugins/zynaddsubfx/Misc/MiddleWare.cpp

+ 9
- 1
source/native-plugins/zynaddsubfx/Misc/Master.cpp View File

@@ -230,9 +230,11 @@ static const Ports master_ports = {
};
const Ports &Master::ports = master_ports;

#ifndef PLUGINVERSION
//XXX HACKS
Master *the_master;
rtosc::ThreadLink *the_bToU;
#endif

class DataObj:public rtosc::RtData
{
@@ -290,12 +292,14 @@ Master::Master(const SYNTH_T &synth_)
bToU = NULL;
uToB = NULL;
memory = new Allocator();
the_master = this;
swaplr = 0;
off = 0;
smps = 0;
bufl = new float[synth.buffersize];
bufr = new float[synth.buffersize];
#ifndef PLUGINVERSION
the_master = this;
#endif

fft = new FFTwrapper(synth.oscilsize);

@@ -319,6 +323,7 @@ Master::Master(const SYNTH_T &synth_)

defaults();

#ifndef PLUGINVERSION
midi.event_cb = [](const char *m)
{
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);
Master::ports.dispatch(m+1, d);
};
#else
midi.event_cb = [](const char *) {};
#endif

midi.error_cb = [](const char *a, const char *b)
{


+ 6
- 2
source/native-plugins/zynaddsubfx/Misc/MiddleWare.cpp View File

@@ -37,7 +37,9 @@
#include <err.h>

using std::string;
#ifndef PLUGINVERSION
extern rtosc::ThreadLink *the_bToU;//XXX
#endif

/******************************************************************************
* 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);
fprintf(stderr, "lo server running on %d\n", lo_server_get_port(server));

#ifndef CARLA_VERSION_STRING
#ifndef PLUGINVERSION
clean_up_tmp_nams();
create_tmp_file((unsigned)lo_server_get_port(server));
#endif
@@ -856,7 +858,9 @@ MiddleWareImpl::MiddleWareImpl(MiddleWare *mw, SYNTH_T synth_, int prefered_port
idle = 0;
idle_ptr = 0;

#ifndef PLUGINVERSION
the_bToU = bToU;
#endif
master = new Master(synth);
master->bToU = bToU;
master->uToB = uToB;
@@ -999,7 +1003,7 @@ void MiddleWareImpl::bToUhandle(const char *rtmsg, bool dummy)
broadcast = true;
} else if(broadcast) {
broadcast = false;
#ifdef CARLA_VERSION_STRING
#ifdef PLUGINVERSION
if (!curr_url.empty()) // falktx: check added
cb(ui, rtmsg);



Loading…
Cancel
Save