zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 9173c76ed853415edb104cdbaf1da3e7e6996ced
parent a29991e8711fc10d487466f68671e402b0485dfb
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Fri,  8 May 2015 16:44:05 -0400

Reduce Debug Output

Diffstat:
Msrc/Misc/MiddleWare.cpp | 13+++++--------
Msrc/UI/Connection.cpp | 10++--------
Msrc/UI/Fl_Oscilloscope.h | 2++
Msrc/UI/Fl_PADnoteOvertonePosition.h | 2--
4 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp @@ -171,7 +171,7 @@ void preparePadSynth(string path, PADnoteParameters *p, rtosc::ThreadLink *uToB) (unsigned N, PADnoteParameters::Sample &s) { max = max<N ? N : max; - printf("sending info to '%s'\n", (path+to_s(N)).c_str()); + //printf("sending info to '%s'\n", (path+to_s(N)).c_str()); uToB->write((path+to_s(N)).c_str(), "ifb", s.size, s.basefreq, sizeof(float*), &s.smp); }, []{return false;}); @@ -716,7 +716,7 @@ public: //012345678 ///presets/ real_preset_ports.dispatch(msg+9, d); - printf("Something <%s>\n", msg+9); + //printf("Something <%s>\n", msg+9); if(strstr(msg, "paste") && rtosc_argument_string(msg)[0] == 's') { char buffer[1024]; rtosc_message(buffer, 1024, "/damage", "s", @@ -943,7 +943,7 @@ void MiddleWareImpl::bToUhandle(const char *rtmsg, bool dummy) } //Activity dot - printf(".");fflush(stdout); + //printf(".");fflush(stdout); if(!strcmp(rtmsg, "/echo") && !strcmp(rtosc_argument_string(rtmsg),"ss") @@ -998,7 +998,7 @@ void MiddleWareImpl::bToUhandle(const char *rtmsg, bool dummy) bool MiddleWareImpl::handleOscil(string path, const char *msg, void *v) { - printf("handleOscil...\n"); + //printf("handleOscil...\n"); char buffer[1024]; memset(buffer, 0, sizeof(buffer)); DummyDataObj d(buffer, 1024, v, this, uToB); @@ -1046,13 +1046,11 @@ void MiddleWareImpl::kitEnable(const char *msg) type = 1; else if(strstr(msg, "Psubenabled")) type = 2; - printf("type='%d'\n", type); if(type == -1) return; const char *tmp = strstr(msg, "part"); - printf("part='%s'\n", tmp); if(tmp == NULL) return; @@ -1060,7 +1058,6 @@ void MiddleWareImpl::kitEnable(const char *msg) const int part = atoi(tmp+4); tmp = strstr(msg, "kit"); - printf("kit='%s'\n", tmp); if(tmp == NULL) return; @@ -1072,7 +1069,7 @@ void MiddleWareImpl::kitEnable(const char *msg) void MiddleWareImpl::kitEnable(int part, int kit, int type) { - printf("attempting a kit enable<%d,%d,%d>\n", part, kit, type); + //printf("attempting a kit enable<%d,%d,%d>\n", part, kit, type); string url = "/part"+to_s(part)+"/kit"+to_s(kit)+"/"; void *ptr = NULL; if(type == 0 && kits.add[part][kit] == NULL) { diff --git a/src/UI/Connection.cpp b/src/UI/Connection.cpp @@ -280,8 +280,8 @@ class UI_Interface:public Fl_Osc_Interface void renameLink(string old, string newer, Fl_Osc_Widget *w) override { - fprintf(stdout, "renameLink('%s','%s',%p)\n", - old.c_str(), newer.c_str(), w); + //fprintf(stdout, "renameLink('%s','%s',%p)\n", + // old.c_str(), newer.c_str(), w); removeLink(old, w); createLink(newer, w); } @@ -324,12 +324,7 @@ class UI_Interface:public Fl_Osc_Interface for(auto pair:map) { if(strstr(pair.first.c_str(), path)) { auto *tmp = dynamic_cast<Fl_Widget*>(pair.second); - //if(tmp) - // printf("%x, %d %d [%s]\n", (int)pair.second, tmp->visible_r(), tmp->visible(), pair.first.c_str()); - //else - // printf("%x, (NULL)[%s]\n", (int)pair.second,pair.first.c_str()); if(!tmp || tmp->visible_r()) { - printf("*"); pair.second->update(); } } @@ -339,7 +334,6 @@ class UI_Interface:public Fl_Osc_Interface void tryLink(const char *msg) override { - //DEBUG //if(strcmp(msg, "/vu-meter"))//Ignore repeated message // printf("trying the link for a '%s'<%s>\n", msg, rtosc_argument_string(msg)); diff --git a/src/UI/Fl_Oscilloscope.h b/src/UI/Fl_Oscilloscope.h @@ -44,6 +44,8 @@ class Fl_Oscilloscope : public Fl_Box, public Fl_Osc_Widget virtual void OSC_value(int smp) { + if(smp == oscilsize) + return; oscilsize = smp; delete []smps; smps = new float[oscilsize]; diff --git a/src/UI/Fl_PADnoteOvertonePosition.h b/src/UI/Fl_PADnoteOvertonePosition.h @@ -51,13 +51,11 @@ class PADnoteOvertonePosition: public Fl_Box, Fl_Osc_Widget osc->createLink(base_path + "Pmode", (Fl_Osc_Widget*) this); - fprintf(stderr, "registered at my location '%s'\n", (base_path + "nhr").c_str()); update(); } void update(void) { - printf("Update...\n"); osc->requestValue(base_path + "nhr"); osc->requestValue(base_path + "oscilgen/spectrum"); osc->requestValue(base_path + "Pmode");