commit 34b89400e68357a2aca75d5d6e2bb2c3f02fb4ef
parent f0e940cb55d2ea31c804beccbe6ee05ea98e88f3
Author: Johannes Lorenz <[email protected]>
Date: Sun, 8 Nov 2020 00:32:41 +0100
MW: Don't let walk_ports query disabled non-RT params
Diffstat:
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp
@@ -350,9 +350,15 @@ struct NonRtObjStore
d.obj = osc;
OscilGen::non_realtime_ports.dispatch(msg, d);
}
- else
- fprintf(stderr, "Warning: trying to access oscil object \"%s\","
- "which does not exist\n", obj_rl.c_str());
+ else {
+ // print warning, except in rtosc::walk_ports
+ if(obj_rl.find("/pointer") == obj_rl.npos)
+ {
+ fprintf(stderr, "Warning: trying to access oscil object \"%s\","
+ "which does not exist\n", obj_rl.c_str());
+ }
+ d.obj = nullptr; // tell walk_ports that there's nothing to recurse here...
+ }
}
void handlePad(const char *msg, rtosc::RtData &d) {
string obj_rl(d.message, msg);
@@ -375,10 +381,16 @@ struct NonRtObjStore
}
}
}
- else
- fprintf(stderr, "Warning: trying to access pad synth object "
- "\"%s\", which does not exist\n",
- obj_rl.c_str());
+ else {
+ // print warning, except in rtosc::walk_ports
+ if(obj_rl.find("/pointer") == obj_rl.npos)
+ {
+ fprintf(stderr, "Warning: trying to access pad synth object "
+ "\"%s\", which does not exist\n",
+ obj_rl.c_str());
+ }
+ d.obj = nullptr; // tell walk_ports that there's nothing to recurse here...
+ }
}
}
};