Project Type:
Programming Language LibraryProject URL:
http://wosclib.sourceforge.net/OSC Documentation URL:
http://wosclib.sourceforge.net/doc/index.htmlWOscLib is a complete (server and client), easy to use OSC (OpenSound-Control) library, featuring Object Oriented (C++) design (modularity), platform- independence, type-safety (especially in OSC-methods), exception-handling and good documentation (doxygen).
Transport Type:
UDP
TCP
Bidirectional UDP (via sendto/recvfrom)
Features:
Packet Parsing (Client)
Packet Construction (Server)
Bundle Support
Timetag Support
Wildcard Matching Support
High Speed (> 100 hz packet rate)
Bounded Latency
Platform:
Windows
Linux
Mac OSX
Bundle Support:
Reads Bundles
Creates Bundles
Type Support:
i: int32
b: blob
s: string
f: float32
t: timetag
Comments
WOscLib, OSC-Kit and real-time performance
Although WOscLib has a nice developer's interface, in opposite to the original OSC-Kit it is not designed to match the real-time requirement of not allocating new memory at run-time. The memory management in the WOscLib seems to be a basic concept in the implementation, thus this looks like a general problem which can not be solved by minor modifications of the code.
overloading new and delete
You could use a proprietary allocation scheme by providing a custom memory pool and overload new and delete with the pool's allocation functions:
#include "mypool.h"
inline void * operator new(size_t size)
{
return mallocFromPool(size);
};
inline void operator delete(void * mem)
{
freeFromPool(mem);
};
But you'll get memory fragmentation if you're not careful (A simple solution would be a fixed size allocation, providing the maximal allocation size can be handled, what depends on your library usage).
Even more powerful is the overloading of the class specific new/delete, what allows allocation from class-optimized pools at constant time.
Perhaps I adapt the lib such that a constant in time allocation would be possible...