[MoPhO] MoNet changes
Jorge Herrera
jorgeh at ccrma.Stanford.EDU
Tue Nov 10 23:17:55 PST 2009
Hi all,
I made a small change to MoNet. Now is possible to pass user data to the
callback, just like in MoAccel.
If you are using MoNet in your instruments, after updating the src/common
folder you will need to add a new parameter to the callback and also pass this
parameter to the addAddressCallback call. For example:
Old code:
void callbackName( osc::ReceivedMessageArgumentStream & oscin )
{
// your code here
}
...
monet->addAddressCallback( "/some/message", callbackName);
New code:
void callbackName( osc::ReceivedMessageArgumentStream & oscin, void * data )
{
// your code here
}
...
monet->addAddressCallback( "/some/message", callbackName, NULL);
Obviously, you can pass something else instead of NULL is you need.
Let me know if something goes wrong. Cheers,
Jorge
More information about the MoPhO
mailing list