elektrokokke / elektrocillin

See the wiki (link below) for documentation.
https://github.com/elektrokokke/elektrocillin/wiki
5 stars 0 forks source link

Metajack: putting clients in the real jack server level is currently not possible #21

Closed elektrokokke closed 13 years ago

elektrokokke commented 13 years ago

... when linking against metajack. The reason for this is the different midi implementations. With the given Jack midi api there is no way to tell wether a wrapped client or a real client called those functions. Therefore the clients linked against metajack are using the metajack midi functions, which are not compatible with the real midi implementation.

A workaround for this would be to remember a mapping from midi buffer pointers to the clients asking for them. The downside of such an approach would be that the midi buffer is acquired in the process thread, which would lead to using stl::map or the like in the process thread, which might break the "no memory allocation" rule.

elektrokokke commented 13 years ago

This is now possible. The issue was solved by putting a "magic number" into the beginning of each midi buffer that was created by metajack. This is also done by Jack2 (with a different magic number of course), so should be safe.

Tests show it's working on Linux and Windows.