Skip message processing if no callback
This commit is contained in:
parent
e1c607e28a
commit
9b044a4eb9
1 changed files with 6 additions and 4 deletions
|
|
@ -21,10 +21,12 @@ inline void Client::receive(int delay, const char* path, const char* sig, const
|
|||
template <char... Sig>
|
||||
inline void Client::receive(int delay, const char* path, OscDecayedType<Sig>... values)
|
||||
{
|
||||
constexpr size_t size = sizeof...(Sig);
|
||||
char sig[size + 1] { Sig..., '\0' };
|
||||
sfizz_arg_t args[size] { OscDataTraits<Sig>::make_arg(values)... };
|
||||
receive(delay, path, sig, args);
|
||||
if (receive_) {
|
||||
constexpr size_t size = sizeof...(Sig);
|
||||
char sig[size + 1] { Sig..., '\0' };
|
||||
sfizz_arg_t args[size] { OscDataTraits<Sig>::make_arg(values)... };
|
||||
receive_(data_, delay, path, sig, args);
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue