commit 425eed8bccbb64013cfacbedf4bbb1943a25151a
parent ce9f78d2bdc0c1efd4bde02d2603204746ac13b7
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Thu, 19 May 2016 14:24:58 -0400
WatchPoint: Fix Crash After Changing Instruments
Diffstat:
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp
@@ -484,7 +484,8 @@ public:
master->time,
config->cfg.GzipCompression,
config->cfg.Interpolation,
- &master->microtonal, master->fft);
+ &master->microtonal, master->fft, &master->watcher,
+ ("/part"+to_s(npart)+"/").c_str());
if(p->loadXMLinstrument(filename))
fprintf(stderr, "Warning: failed to load part<%s>!\n", filename);
diff --git a/src/Synth/ADnote.cpp b/src/Synth/ADnote.cpp
@@ -31,7 +31,6 @@ ADnote::ADnote(ADnoteParameters *pars_, SynthParams &spars,
WatchManager *wm, const char *prefix)
:SynthNote(spars), pars(*pars_)
{
- printf("prefix = '%s'\n", prefix);
memory.beginTransaction();
tmpwavel = memory.valloc<float>(synth.buffersize);
tmpwaver = memory.valloc<float>(synth.buffersize);
@@ -779,7 +778,6 @@ void ADnote::initparameters(WatchManager *wm, const char *prefix)
{
int tmp[NUM_VOICES];
ScratchString pre = prefix;
- printf("pre = <%s>\n", pre.c_str);
//ADnoteParameters &pars = *partparams;
// Global Parameters
diff --git a/src/Synth/WatchPoint.cpp b/src/Synth/WatchPoint.cpp
@@ -32,7 +32,7 @@ WatchPoint::WatchPoint(WatchManager *ref, const char *prefix, const char *id)
strncpy(identity, prefix, 128);
if(id)
strncat(identity, id, 128);
- printf("new watchpoint ={%s:%s} <%s>\n", prefix, id, identity);
+ //printf("new watchpoint ={%s:%s} <%s>\n", prefix, id, identity);
}
bool WatchPoint::is_active(void)
@@ -95,6 +95,8 @@ void WatchManager::tick(void)
bool WatchManager::active(const char *id) const
{
+ assert(this);
+ assert(id);
if(new_active)
for(int i=0; i<MAX_WATCH; ++i)
if(!strcmp(active_list[i], id))