On Mon, August 11, 2008 11:03 am, Michael Wolkstein wrote: > Ardour and seq24 do not work together if set the correct time values in > both apps. > I think the problem is in seq24!
FWIW, I've been experimenting with The Non Sequencer (http://non-sequencer.tuxfamily.org/). In fact, it's the reason why I worked on the JACK MIDI patches. > AND!! the transportmaster funktion have to change to a valid c++ callback. > In moment it is more an c callback.. But I am a c++ beginner and do not > know how to do this :-(. Like this. There may be typos... I didn't have time to try and compile it. I usually divide it up into two functions so that you can call class methods normally instead of doing a bunch of ((JackOutput*)arg)->my_method(foo); diff --git a/libs/hydrogen/include/hydrogen/IO/JackOutput.h b/libs/hydrogen/include/hydrogen/IO/JackOutput.h index 6364a7b..7aa84cd 100644 --- a/libs/hydrogen/include/hydrogen/IO/JackOutput.h +++ b/libs/hydrogen/include/hydrogen/IO/JackOutput.h @@ -100,6 +100,17 @@ public: void calculateFrameOffset(); void locateInNCycles( unsigned long frame, int cycles_to_wait = 2 ); +protected: + static void jack_timebase_callback(jack_transport_state_t state, + jack_nframes_t nframes, + jack_position_t *pos, + int new_pos, + void *arg); + void jack_timebase_callback_impl(jack_transport_state_t state, + jack_nframes_t nframes, + jack_position_t *pos, + int new_pos); + private: void relocateBBT(); long long bbt_frame_offset; diff --git a/libs/hydrogen/src/IO/jack_output.cpp b/libs/hydrogen/src/IO/jack_output.cpp index a5a8e57..9a43be6 100644 --- a/libs/hydrogen/src/IO/jack_output.cpp +++ b/libs/hydrogen/src/IO/jack_output.cpp @@ -693,9 +693,18 @@ void JackOutput::com_release() ///this must be fixed to a valid c++ callback as a member of JackOutput -void jack_timebase_callback(jack_transport_state_t state, jack_nframes_t nframes, +void JackOutput::jack_timebase_callback(jack_transport_state_t state, jack_nframes_t nframes, jack_position_t *pos, int new_pos, void *arg) { + JackOutput *me = dynamic_cast<JackOutput*>(arg); + if(me) { + me->jack_timebase_callback_impl(state, nframes, pos, new_pos); + } +} + +void JackOutput::jack_timebase_callback_impl(jack_transport_state_t state, jack_nframes_t nframes, + jack_position_t *pos, int new_pos) +{ Hydrogen * H = Hydrogen::get_instance(); //static double jack_tick; Peace, Gabriel -- G a b r i e l M B e d d i n g f i e l d ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Hydrogen-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
