New OSC Filter attribute of source

Adding attribute for setting filter:  set filter by name, set method by name, set first argument value
This commit is contained in:
Bruno Herbelin
2024-02-17 23:42:03 +01:00
parent 47ff1a2dd8
commit 8e28eba959
8 changed files with 555 additions and 39 deletions

View File

@@ -313,4 +313,41 @@ void drawMediaPlayer()
}
// // get second argument : can be string, float or nothing
// bool argloop = false;
// while (!argloop) {
// // work on copy of arguments
// osc::ReceivedMessageArgumentStream __args = arguments;
// // no argument
// if (__args.Eos()) {
// filter_arg_type = osc::NIL_TYPE_TAG;
// argloop = true;
// }
// // try with float (last try)
// if (filter_arg_type == osc::FLOAT_TYPE_TAG) {
// try {
// __args >> filter_value >> osc::EndMessage;
// } catch (osc::WrongArgumentTypeException &) {
// filter_arg_type = osc::NIL_TYPE_TAG;
// }
// // done!
// argloop = true;
// }
// // try with string (first try)
// if (filter_arg_type == osc::STRING_TYPE_TAG) {
// try {
// const char *m = nullptr;
// __args >> m >> osc::EndMessage;
// // done!
// filter_method = std::string(m);
// std::transform(filter_method.begin(),
// filter_method.end(),
// filter_method.begin(),
// ::tolower);
// argloop = true;
// } catch (osc::WrongArgumentTypeException &) {
// // next: try with float
// filter_arg_type = osc::FLOAT_TYPE_TAG;
// }
// }
// }