projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
send a slightly more useful message if a control protocol's probe() method fails
[ardour.git]
/
libs
/
ardour
/
transform.cc
diff --git
a/libs/ardour/transform.cc
b/libs/ardour/transform.cc
index 775b6bce5208a4740d772b0f920732b2f6ffd60e..9f029829deb4e4cd3044a33fadaeaeeb0cb605dd 100644
(file)
--- a/
libs/ardour/transform.cc
+++ b/
libs/ardour/transform.cc
@@
-63,7
+63,7
@@
Transform::Value::eval(const Context& ctx) const
return Variant(g_random_double());
}
return Variant(g_random_double());
}
- return Variant
();
+ return Variant();
}
void
}
void
@@
-106,6
+106,12
@@
Transform::Operation::eval(Context& ctx) const
}
value /= rhs.to_double();
break;
}
value /= rhs.to_double();
break;
+ case MOD:
+ if (rhs.to_double() == 0.0) {
+ return; // Program will fail safely
+ }
+ value = fmod(value, rhs.to_double());
+ break;
default: break;
}
default: break;
}
@@
-115,7
+121,7
@@
Transform::Operation::eval(Context& ctx) const
Command*
Transform::operator()(boost::shared_ptr<MidiModel> model,
Command*
Transform::operator()(boost::shared_ptr<MidiModel> model,
- Evoral::
MusicalTime
position,
+ Evoral::
Beats
position,
std::vector<Notes>& seqs)
{
typedef MidiModel::NoteDiffCommand Command;
std::vector<Notes>& seqs)
{
typedef MidiModel::NoteDiffCommand Command;