diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-08-09 12:15:37 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-08-09 12:15:37 -0400 |
commit | a34d7071753867b9aba3bca2f3436ed4a980c895 (patch) | |
tree | 20e7e3658bec5eb220b7330695c74b8a9034df52 /libs/ardour/ardour/session.h | |
parent | da7451991178ad224acac55d177011e32204cac7 (diff) |
split up session code that uses parts of the JACK API (timebase + session event handling) and connect it directly to the jack audiobackend
i've made the audiobackend call the session directly so that only one object (ARDOUR::Session) has a need for the JACK types
and only one .cc file (session_jack.cc) needs jack.h. having ARDOUR::AudioEngine act as an intermediary would be cleaner
conceptually but would end up causing two different ARDOUR objects to have jack types in their own API.
Diffstat (limited to 'libs/ardour/ardour/session.h')
-rw-r--r-- | libs/ardour/ardour/session.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index c291220874..31f0658931 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -381,9 +381,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi framecnt_t worst_track_latency () const { return _worst_track_latency; } framecnt_t worst_playback_latency () const { return _worst_output_latency + _worst_track_latency; } -#ifdef HAVE_JACK_SESSION - void jack_session_event (jack_session_event_t* event); -#endif int save_state (std::string snapshot_name, bool pending = false, bool switch_to_snapshot = false); int restore_state (std::string snapshot_name); int save_template (std::string template_name); @@ -863,6 +860,15 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi boost::shared_ptr<IO> ltc_input_io() { return _ltc_input; } boost::shared_ptr<IO> ltc_output_io() { return _ltc_output; } + /* Callbacks specifically related to JACK, and called directly + * from the JACK audio backend. + */ + +#ifdef HAVE_JACK_SESSION + void jack_session_event (jack_session_event_t* event); +#endif + void jack_timebase_callback (jack_transport_state_t, pframes_t, jack_position_t*, int); + protected: friend class AudioEngine; void set_block_size (pframes_t nframes); @@ -1436,9 +1442,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi */ std::list<GQuark> _current_trans_quarks; - // void timebase_callback (TransportState, pframes_t, jack_position_t*, int); - int jack_sync_callback (TransportState, framepos_t); - void reset_jack_connection (jack_client_t* jack); + int backend_sync_callback (TransportState, framepos_t); + void process_rtop (SessionEvent*); void update_latency (bool playback); |