From c59dade835fa5aa8150fae6d503bd93eee92075d Mon Sep 17 00:00:00 2001 From: Torben Hohn Date: Thu, 3 Jun 2010 19:50:22 +0000 Subject: [PATCH] merge 3.0P into trunk. git-svn-id: svn://localhost/ardour2/branches/3.0@7224 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/buffer_manager.h | 1 + libs/ardour/ardour/route.h | 3 ++- libs/ardour/ardour/session.h | 3 +++ libs/ardour/globals.cc | 2 +- libs/ardour/route.cc | 2 ++ libs/ardour/session.cc | 5 +++++ libs/ardour/session_process.cc | 12 ++++++++++-- libs/ardour/wscript | 4 ++++ 8 files changed, 28 insertions(+), 4 deletions(-) diff --git a/libs/ardour/ardour/buffer_manager.h b/libs/ardour/ardour/buffer_manager.h index 2b835c0489..f86d92ac23 100644 --- a/libs/ardour/ardour/buffer_manager.h +++ b/libs/ardour/ardour/buffer_manager.h @@ -28,6 +28,7 @@ class BufferManager typedef RingBufferNPT ThreadBufferFIFO; typedef std::list ThreadBufferList; + static ThreadBufferFIFO* thread_buffers; static ThreadBufferList* thread_buffers_list; }; diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 95d60e1aa6..3d4f7f139a 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -43,6 +43,7 @@ #include "ardour/types.h" #include "ardour/mute_master.h" #include "ardour/route_group_member.h" +#include "ardour/graphnode.h" namespace ARDOUR { @@ -56,7 +57,7 @@ class Send; class InternalReturn; class MonitorProcessor; -class Route : public SessionObject, public AutomatableControls, public RouteGroupMember +class Route : public SessionObject, public AutomatableControls, public RouteGroupMember, public GraphNode { public: diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 161b6e07ec..d1362b379a 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -119,6 +119,7 @@ class Slave; class Source; class TempoMap; class VSTPlugin; +class Graph; class Track; extern void setup_enum_writer (); @@ -1189,6 +1190,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi /* routes stuff */ + boost::shared_ptr route_graph; + SerializedRCUManager routes; void add_routes (RouteList&, bool save); diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index c9641bfe43..e4addcd88a 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -408,7 +408,7 @@ ARDOUR::init (bool use_vst, bool try_optimization) new PluginManager (); ProcessThread::init (); - BufferManager::init (2); // XX should be num_processors_for_dsp + BufferManager::init (10); // XX should be num_processors_for_dsp return 0; } diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index a2988670d9..4dcdcf1898 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -58,6 +58,7 @@ #include "ardour/session.h" #include "ardour/timestamps.h" #include "ardour/utils.h" +#include "ardour/graph.h" #include "i18n.h" @@ -72,6 +73,7 @@ PBD::Signal0 Route::RemoteControlIDChange; Route::Route (Session& sess, string name, Flag flg, DataType default_type) : SessionObject (sess, name) , AutomatableControls (sess) + , GraphNode( sess.route_graph ) , _active (true) , _initial_delay (0) , _roll_delay (0) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index a5443a1797..68244c9812 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -96,6 +96,7 @@ #include "ardour/tape_file_matcher.h" #include "ardour/tempo.h" #include "ardour/utils.h" +#include "ardour/graph.h" #include "midi++/jack.h" @@ -144,6 +145,7 @@ Session::Session (AudioEngine &eng, _butler (new Butler (*this)), _post_transport_work (0), _send_timecode_update (false), + route_graph (new Graph(*this)), routes (new RouteList), _total_free_4k_blocks (0), _bundles (new BundleList), @@ -1322,8 +1324,11 @@ Session::resort_routes () shared_ptr r = writer.get_copy (); resort_routes_using (r); /* writer goes out of scope and forces update */ + route_graph->rechain( r ); } + route_graph->dump(1); + #ifndef NDEBUG boost::shared_ptr rl = routes.reader (); for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 94527c6646..9549227933 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -36,6 +36,7 @@ #include "ardour/session.h" #include "ardour/slave.h" #include "ardour/timestamps.h" +#include "ardour/graph.h" #include "ardour/port.h" #include "midi++/manager.h" @@ -104,6 +105,8 @@ Session::no_roll (nframes_t nframes) _click_io->silence (nframes); } + route_graph->routes_no_roll( nframes, _transport_frame, end_frame, non_realtime_work_pending(), actively_recording(), declick); + /* for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { if ((*i)->is_hidden()) { @@ -119,6 +122,7 @@ Session::no_roll (nframes_t nframes) break; } } + */ return ret; } @@ -141,6 +145,8 @@ Session::process_routes (nframes_t nframes, bool& need_butler) const nframes_t start_frame = _transport_frame; const nframes_t end_frame = _transport_frame + (nframes_t)floor(nframes * _transport_speed); + route_graph->process_routes( nframes, start_frame, end_frame, declick, record_active, rec_monitors, need_butler); +/* for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { int ret; @@ -156,7 +162,7 @@ Session::process_routes (nframes_t nframes, bool& need_butler) return -1; } } - +*/ return 0; } @@ -176,6 +182,8 @@ Session::silent_process_routes (nframes_t nframes, bool& need_butler) const nframes_t start_frame = _transport_frame; const nframes_t end_frame = _transport_frame + lrintf(nframes * _transport_speed); + route_graph->silent_process_routes( nframes, start_frame, end_frame, record_active, rec_monitors, need_butler); +/* for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { int ret; @@ -189,7 +197,7 @@ Session::silent_process_routes (nframes_t nframes, bool& need_butler) return -1; } } - +*/ return 0; } diff --git a/libs/ardour/wscript b/libs/ardour/wscript index d12ab3cc94..cee5c5f263 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -99,6 +99,8 @@ libardour_sources = [ 'find_session.cc', 'gain.cc', 'globals.cc', + 'graph.cc', + 'graphnode.cc', 'import.cc', 'internal_return.cc', 'internal_send.cc', @@ -245,6 +247,8 @@ def configure(conf): conf.check(header_name='wordexp.h', define_name='HAVE_WORDEXP') conf.check(header_name='jack/session.h', define_name='HAVE_JACK_SESSION') + + conf.check(header_name='unistd.h', define_name='HAVE_UNISTD') conf.check_cc(fragment = "#include \nvoid callback (int code, const char* reason, void* arg) { return; }\nint main(int argc, char **argv) { jack_client_t* c; jack_on_info_shutdown (c, callback, (void*) 0); return 0; }\n", linkflags = ['-ljack'], -- 2.30.2