#include <string>
#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
#include <pbd/fastlog.h>
#include <glibmm/thread.h>
#include <ardour/ardour.h>
#include <ardour/io.h>
-#include <ardour/session.h>
-#include <ardour/io_processor.h>
#include <ardour/types.h>
namespace ARDOUR {
class Processor;
+class IOProcessor;
class Send;
class RouteGroup;
Route (Session&, const XMLNode&, DataType default_type = DataType::AUDIO);
virtual ~Route();
+ static std::string ensure_track_or_route_name(std::string, Session &);
+
std::string comment() { return _comment; }
void set_comment (std::string str, void *src);
long order_key (const char* name) const;
void set_order_key (const char* name, long n);
- bool hidden() const { return _flags & Hidden; }
- bool master() const { return _flags & MasterOut; }
- bool control() const { return _flags & ControlOut; }
+ bool is_hidden() const { return _flags & Hidden; }
+ bool is_master() const { return _flags & MasterOut; }
+ bool is_control() const { return _flags & ControlOut; }
/* these are the core of the API of a Route. see the protected sections as well */
/* end of vfunc-based API */
+ void shift (nframes64_t, nframes64_t);
+
/* override IO::set_gain() to provide group control */
void set_gain (gain_t val, void *src);
void inc_gain (gain_t delta, void *src);
-
- bool active() const { return _active; }
- void set_active (bool yn);
-
+
void set_solo (bool yn, void *src);
bool soloed() const { return _soloed; }
void set_solo_safe (bool yn, void *src);
bool solo_safe() const { return _solo_safe; }
-
+
void set_mute (bool yn, void *src);
bool muted() const { return _muted; }
bool solo_muted() const { return desired_solo_gain == 0.0; }
void flush_processors ();
- template<class T> void foreach_processor (T *obj, void (T::*func)(boost::shared_ptr<Processor>)) {
+ void foreach_processor (sigc::slot<void, boost::weak_ptr<Processor> > method) {
Glib::RWLock::ReaderLock lm (_processor_lock);
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
- (obj->*func) (*i);
+ method (boost::weak_ptr<Processor> (*i));
}
}
ProcessorList::iterator i;
for (i = _processors.begin(); i != _processors.end() && n; ++i, --n);
if (i == _processors.end()) {
- return boost::shared_ptr<IOProcessor> ();
+ return boost::shared_ptr<Processor> ();
} else {
return *i;
}
void all_processors_active (Placement, bool state);
virtual nframes_t update_total_latency();
- nframes_t signal_latency() const { return _own_latency; }
- virtual void set_latency_delay (nframes_t);
+ void set_latency_delay (nframes_t);
+ void set_user_latency (nframes_t);
+ nframes_t initial_delay() const { return _initial_delay; }
sigc::signal<void,void*> solo_changed;
sigc::signal<void,void*> solo_safe_changed;
sigc::signal<void,void*> record_enable_changed;
sigc::signal<void,void*> edit_group_changed;
sigc::signal<void,void*> mix_group_changed;
- sigc::signal<void> active_changed;
sigc::signal<void,void*> meter_change;
+ sigc::signal<void> signal_latency_changed;
+ sigc::signal<void> initial_delay_changed;
/* gui's call this for their own purposes. */
IO* control_outs() { return _control_outs; }
bool feeds (boost::shared_ptr<Route>);
- set<boost::shared_ptr<Route> > fed_by;
+ std::set<boost::shared_ptr<Route> > fed_by;
struct ToggleControllable : public PBD::Controllable {
enum ToggleType {
ToggleType type;
};
- PBD::Controllable& solo_control() {
+ boost::shared_ptr<PBD::Controllable> solo_control() {
return _solo_control;
}
- PBD::Controllable& mute_control() {
+ boost::shared_ptr<PBD::Controllable> mute_control() {
return _mute_control;
}
- void automation_snapshot (nframes_t now);
+ void automation_snapshot (nframes_t now, bool force=false);
void protect_automation ();
void set_remote_control_id (uint32_t id);
uint32_t remote_control_id () const;
sigc::signal<void> RemoteControlIDChanged;
+ void sync_order_keys (const char* base);
+ static sigc::signal<void,const char*> SyncOrderKeys;
+
protected:
friend class Session;
+ void catch_up_on_solo_mute_override ();
void set_solo_mute (bool yn);
void set_block_size (nframes_t nframes);
bool has_external_redirects() const;
bool _soloed : 1;
bool _solo_safe : 1;
bool _recordable : 1;
- bool _active : 1;
bool _mute_affects_pre_fader : 1;
bool _mute_affects_post_fader : 1;
bool _mute_affects_control_outs : 1;
nframes_t _initial_delay;
nframes_t _roll_delay;
- nframes_t _own_latency;
ProcessorList _processors;
Glib::RWLock _processor_lock;
IO *_control_outs;
std::string _comment;
bool _have_internal_generator;
- ToggleControllable _solo_control;
- ToggleControllable _mute_control;
+ boost::shared_ptr<ToggleControllable> _solo_control;
+ boost::shared_ptr<ToggleControllable> _mute_control;
nframes_t check_initial_delay (nframes_t, nframes_t&, nframes_t&);
void input_change_handler (IOChange, void *src);
void output_change_handler (IOChange, void *src);
- int reset_plugin_counts (ProcessorStreams*); /* locked */
- int _reset_plugin_counts (ProcessorStreams*); /* unlocked */
+ int reset_processor_counts (ProcessorStreams*); /* locked */
+ int _reset_processor_counts (ProcessorStreams*); /* unlocked */
/* processor I/O channels and plugin count handling */
ProcessorCount (boost::shared_ptr<ARDOUR::Processor> ins) : processor(ins) {}
};
- int32_t apply_some_plugin_counts (std::list<ProcessorCount>& iclist);
- bool check_some_plugin_counts (std::list<ProcessorCount>& iclist, ChanCount required_inputs, ProcessorStreams* err_streams);
+ int32_t apply_some_processor_counts (std::list<ProcessorCount>& iclist);
+ bool check_some_processor_counts (std::list<ProcessorCount>& iclist, ChanCount required_inputs, ProcessorStreams* err_streams);
void set_deferred_state ();
void add_processor_from_xml (const XMLNode&);