diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-04-19 02:11:39 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-04-19 02:11:39 +0000 |
commit | 74e6e37d3038cfe45b856d92576b66aca519f43f (patch) | |
tree | 71763925dfb3f1ff26516f489a028b83655096e9 /libs/ardour | |
parent | 099c4c8d064dce9f0517ae3e32d694a19d580d71 (diff) |
a) fix editor hscroller to follow PT behaviour - scrollbar always
covers 0...full session + 10% of current zoom page size
b) add "big meter" mode to tranzport and fix more bugs with tranzport
support
git-svn-id: svn://localhost/trunk/ardour2@455 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/session.h | 1 | ||||
-rw-r--r-- | libs/ardour/control_protocol.cc | 15 | ||||
-rw-r--r-- | libs/ardour/session.cc | 28 |
3 files changed, 26 insertions, 18 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 201cc48ada..924a482936 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -365,6 +365,7 @@ class Session : public sigc::trackable, public Stateful int remove_region_from_region_list (Region&); + jack_nframes_t get_maximum_extent () const; jack_nframes_t current_end_frame() const { return end_location->start(); } jack_nframes_t current_start_frame() const { return start_location->start(); } jack_nframes_t frame_rate() const { return _current_frame_rate; } diff --git a/libs/ardour/control_protocol.cc b/libs/ardour/control_protocol.cc index 2a28921d53..1e4bd8efc9 100644 --- a/libs/ardour/control_protocol.cc +++ b/libs/ardour/control_protocol.cc @@ -153,6 +153,8 @@ ControlProtocol::thread_work () struct sched_param rtparam; int err; + cerr << _name << " receiver thread running\n"; + memset (&rtparam, 0, sizeof (rtparam)); rtparam.sched_priority = 3; /* XXX should be relative to audio (JACK) thread */ @@ -238,15 +240,12 @@ ControlProtocol::thread_work () continue; } - if (send()) { - - if (send_route_feedback ()) { - list<Route*> routes = session.get_routes(); /* copies the routes */ - send_route_feedback (routes); - } - - send_global_feedback (); + if (send_route_feedback ()) { + list<Route*> routes = session.get_routes(); /* copies the routes */ + send_route_feedback (routes); } + + send_global_feedback (); } return 0; diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 216517e668..125e0387f3 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2227,29 +2227,37 @@ Session::route_by_remote_id (uint32_t id) void Session::find_current_end () { - jack_nframes_t max = 0; - jack_nframes_t me; - if (_state_of_the_state & Loading) { return; } + jack_nframes_t max = get_maximum_extent (); + + if (max > end_location->end()) { + end_location->set_end (max); + set_dirty(); + DurationChanged(); /* EMIT SIGNAL */ + } +} + +jack_nframes_t +Session::get_maximum_extent () const +{ + jack_nframes_t max = 0; + jack_nframes_t me; + /* Don't take the diskstream lock. Caller must have other ways to ensure atomicity. */ - for (DiskStreamList::iterator i = diskstreams.begin(); i != diskstreams.end(); ++i) { + for (DiskStreamList::const_iterator i = diskstreams.begin(); i != diskstreams.end(); ++i) { Playlist* pl = (*i)->playlist(); if ((me = pl->get_maximum_extent()) > max) { max = me; } } - - if (max > end_location->end()) { - end_location->set_end (max); - set_dirty(); - DurationChanged(); /* EMIT SIGNAL */ - } + + return max; } DiskStream * |