[LAD] jack and c++

Christian Schoenebeck cuse at users.sourceforge.net
Mon Nov 10 08:55:42 UTC 2008


Es geschah am Monday 10 November 2008 als Malte Steiner schrieb:
> For a new audio application I need to code a JACK client with C++. So
> far I did it only with C and have a problem with giving the pointer to
> the callback process function, which is a method now. So what is the
> best performing solution? Is a delegate function a good idea, being
> static and triggering the method in the objectinstance?

You don't really have options here. Since Jack only accepts function pointers 
of the exact given prototype for callbacks. So you can either create a) as 
usual a C style function in your .cpp file or b) a static class method, where 
in both solutions you would then call the respective method of the object 
instance.

CU
Christian



More information about the Linux-audio-dev mailing list