13
0

merge 3.0P into trunk.

git-svn-id: svn://localhost/ardour2/branches/3.0@7224 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Torben Hohn 2010-06-03 19:50:22 +00:00
parent fcbb78b010
commit c59dade835
8 changed files with 28 additions and 4 deletions

View File

@ -28,6 +28,7 @@ class BufferManager
typedef RingBufferNPT<ThreadBuffers*> ThreadBufferFIFO; typedef RingBufferNPT<ThreadBuffers*> ThreadBufferFIFO;
typedef std::list<ThreadBuffers*> ThreadBufferList; typedef std::list<ThreadBuffers*> ThreadBufferList;
static ThreadBufferFIFO* thread_buffers; static ThreadBufferFIFO* thread_buffers;
static ThreadBufferList* thread_buffers_list; static ThreadBufferList* thread_buffers_list;
}; };

View File

@ -43,6 +43,7 @@
#include "ardour/types.h" #include "ardour/types.h"
#include "ardour/mute_master.h" #include "ardour/mute_master.h"
#include "ardour/route_group_member.h" #include "ardour/route_group_member.h"
#include "ardour/graphnode.h"
namespace ARDOUR { namespace ARDOUR {
@ -56,7 +57,7 @@ class Send;
class InternalReturn; class InternalReturn;
class MonitorProcessor; class MonitorProcessor;
class Route : public SessionObject, public AutomatableControls, public RouteGroupMember class Route : public SessionObject, public AutomatableControls, public RouteGroupMember, public GraphNode
{ {
public: public:

View File

@ -119,6 +119,7 @@ class Slave;
class Source; class Source;
class TempoMap; class TempoMap;
class VSTPlugin; class VSTPlugin;
class Graph;
class Track; class Track;
extern void setup_enum_writer (); extern void setup_enum_writer ();
@ -1189,6 +1190,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/* routes stuff */ /* routes stuff */
boost::shared_ptr<Graph> route_graph;
SerializedRCUManager<RouteList> routes; SerializedRCUManager<RouteList> routes;
void add_routes (RouteList&, bool save); void add_routes (RouteList&, bool save);

View File

@ -408,7 +408,7 @@ ARDOUR::init (bool use_vst, bool try_optimization)
new PluginManager (); new PluginManager ();
ProcessThread::init (); ProcessThread::init ();
BufferManager::init (2); // XX should be num_processors_for_dsp BufferManager::init (10); // XX should be num_processors_for_dsp
return 0; return 0;
} }

View File

@ -58,6 +58,7 @@
#include "ardour/session.h" #include "ardour/session.h"
#include "ardour/timestamps.h" #include "ardour/timestamps.h"
#include "ardour/utils.h" #include "ardour/utils.h"
#include "ardour/graph.h"
#include "i18n.h" #include "i18n.h"
@ -72,6 +73,7 @@ PBD::Signal0<void> Route::RemoteControlIDChange;
Route::Route (Session& sess, string name, Flag flg, DataType default_type) Route::Route (Session& sess, string name, Flag flg, DataType default_type)
: SessionObject (sess, name) : SessionObject (sess, name)
, AutomatableControls (sess) , AutomatableControls (sess)
, GraphNode( sess.route_graph )
, _active (true) , _active (true)
, _initial_delay (0) , _initial_delay (0)
, _roll_delay (0) , _roll_delay (0)

View File

@ -96,6 +96,7 @@
#include "ardour/tape_file_matcher.h" #include "ardour/tape_file_matcher.h"
#include "ardour/tempo.h" #include "ardour/tempo.h"
#include "ardour/utils.h" #include "ardour/utils.h"
#include "ardour/graph.h"
#include "midi++/jack.h" #include "midi++/jack.h"
@ -144,6 +145,7 @@ Session::Session (AudioEngine &eng,
_butler (new Butler (*this)), _butler (new Butler (*this)),
_post_transport_work (0), _post_transport_work (0),
_send_timecode_update (false), _send_timecode_update (false),
route_graph (new Graph(*this)),
routes (new RouteList), routes (new RouteList),
_total_free_4k_blocks (0), _total_free_4k_blocks (0),
_bundles (new BundleList), _bundles (new BundleList),
@ -1322,8 +1324,11 @@ Session::resort_routes ()
shared_ptr<RouteList> r = writer.get_copy (); shared_ptr<RouteList> r = writer.get_copy ();
resort_routes_using (r); resort_routes_using (r);
/* writer goes out of scope and forces update */ /* writer goes out of scope and forces update */
route_graph->rechain( r );
} }
route_graph->dump(1);
#ifndef NDEBUG #ifndef NDEBUG
boost::shared_ptr<RouteList> rl = routes.reader (); boost::shared_ptr<RouteList> rl = routes.reader ();
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {

View File

@ -36,6 +36,7 @@
#include "ardour/session.h" #include "ardour/session.h"
#include "ardour/slave.h" #include "ardour/slave.h"
#include "ardour/timestamps.h" #include "ardour/timestamps.h"
#include "ardour/graph.h"
#include "ardour/port.h" #include "ardour/port.h"
#include "midi++/manager.h" #include "midi++/manager.h"
@ -104,6 +105,8 @@ Session::no_roll (nframes_t nframes)
_click_io->silence (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) { for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
if ((*i)->is_hidden()) { if ((*i)->is_hidden()) {
@ -119,6 +122,7 @@ Session::no_roll (nframes_t nframes)
break; break;
} }
} }
*/
return ret; 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 start_frame = _transport_frame;
const nframes_t end_frame = _transport_frame + (nframes_t)floor(nframes * _transport_speed); 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) { for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
int ret; int ret;
@ -156,7 +162,7 @@ Session::process_routes (nframes_t nframes, bool& need_butler)
return -1; return -1;
} }
} }
*/
return 0; 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 start_frame = _transport_frame;
const nframes_t end_frame = _transport_frame + lrintf(nframes * _transport_speed); 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) { for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
int ret; int ret;
@ -189,7 +197,7 @@ Session::silent_process_routes (nframes_t nframes, bool& need_butler)
return -1; return -1;
} }
} }
*/
return 0; return 0;
} }

View File

@ -99,6 +99,8 @@ libardour_sources = [
'find_session.cc', 'find_session.cc',
'gain.cc', 'gain.cc',
'globals.cc', 'globals.cc',
'graph.cc',
'graphnode.cc',
'import.cc', 'import.cc',
'internal_return.cc', 'internal_return.cc',
'internal_send.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='wordexp.h', define_name='HAVE_WORDEXP')
conf.check(header_name='jack/session.h', define_name='HAVE_JACK_SESSION') 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 <jack/jack.h>\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", conf.check_cc(fragment = "#include <jack/jack.h>\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'], linkflags = ['-ljack'],