allow automation-follows-relevant-regions again
git-svn-id: svn://localhost/ardour2/branches/3.0@5285 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e3897af5e3
commit
12949b390b
@ -54,6 +54,7 @@ class IO;
|
||||
class Playlist;
|
||||
class Processor;
|
||||
class Region;
|
||||
class Route;
|
||||
class Send;
|
||||
class Session;
|
||||
|
||||
@ -73,8 +74,8 @@ class Diskstream : public SessionObject, public boost::noncopyable
|
||||
|
||||
bool set_name (const std::string& str);
|
||||
|
||||
ARDOUR::IO* io() const { return _io; }
|
||||
void set_io (ARDOUR::IO& io);
|
||||
boost::shared_ptr<ARDOUR::IO> io() const { return _io; }
|
||||
void set_route (ARDOUR::Route&);
|
||||
|
||||
virtual float playback_buffer_load() const = 0;
|
||||
virtual float capture_buffer_load() const = 0;
|
||||
@ -250,7 +251,8 @@ class Diskstream : public SessionObject, public boost::noncopyable
|
||||
|
||||
uint32_t i_am_the_modifier;
|
||||
|
||||
ARDOUR::IO* _io;
|
||||
boost::shared_ptr<ARDOUR::IO> _io;
|
||||
Route* _route;
|
||||
ChanCount _n_channels;
|
||||
|
||||
boost::shared_ptr<Playlist> _playlist;
|
||||
@ -312,6 +314,8 @@ class Diskstream : public SessionObject, public boost::noncopyable
|
||||
sigc::connection plregion_connection;
|
||||
|
||||
Flag _flags;
|
||||
|
||||
void route_going_away ();
|
||||
};
|
||||
|
||||
}; /* namespace ARDOUR */
|
||||
|
@ -176,7 +176,7 @@ int
|
||||
AudioTrack::set_diskstream (boost::shared_ptr<AudioDiskstream> ds, void *src)
|
||||
{
|
||||
_diskstream = ds;
|
||||
_diskstream->set_io (*(_input.get()));
|
||||
_diskstream->set_route (*this);
|
||||
_diskstream->set_destructive (_mode == Destructive);
|
||||
_diskstream->set_non_layered (_mode == NonLayered);
|
||||
|
||||
|
@ -407,7 +407,6 @@ Delivery::target_gain ()
|
||||
*/
|
||||
|
||||
if (_no_outs_cuz_we_no_monitor) {
|
||||
std::cerr << this << " no outs cuz we no monitor\n";
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ void
|
||||
Diskstream::init (Flag f)
|
||||
{
|
||||
_flags = f;
|
||||
_io = 0;
|
||||
_route = 0;
|
||||
_alignment_style = ExistingMaterial;
|
||||
_persistent_alignment_style = ExistingMaterial;
|
||||
first_input_change = true;
|
||||
@ -133,12 +133,15 @@ Diskstream::~Diskstream ()
|
||||
}
|
||||
|
||||
void
|
||||
Diskstream::set_io (IO& io)
|
||||
Diskstream::set_route (Route& r)
|
||||
{
|
||||
_io = &io;
|
||||
_route = &r;
|
||||
_io = _route->input();
|
||||
input_change_pending = ConfigurationChanged;
|
||||
non_realtime_input_change ();
|
||||
set_align_style_from_io ();
|
||||
|
||||
_route->GoingAway.connect (mem_fun (*this, &Diskstream::route_going_away));
|
||||
}
|
||||
|
||||
void
|
||||
@ -420,12 +423,7 @@ Diskstream::remove_region_from_last_capture (boost::weak_ptr<Region> wregion)
|
||||
void
|
||||
Diskstream::playlist_ranges_moved (list< Evoral::RangeMove<nframes_t> > const & movements_frames)
|
||||
{
|
||||
#if 0
|
||||
|
||||
XXX THIS HAS TO BE FIXED FOR 3.0
|
||||
|
||||
|
||||
if (Config->get_automation_follows_regions () == false) {
|
||||
if (!_route || Config->get_automation_follows_regions () == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -436,7 +434,7 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove<nframes_t> > const &
|
||||
}
|
||||
|
||||
/* move gain automation */
|
||||
boost::shared_ptr<AutomationList> gain_alist = _io->gain_control()->list();
|
||||
boost::shared_ptr<AutomationList> gain_alist = _route->gain_control()->alist();
|
||||
XMLNode & before = gain_alist->get_state ();
|
||||
gain_alist->move_ranges (movements);
|
||||
_session.add_command (
|
||||
@ -446,7 +444,7 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove<nframes_t> > const &
|
||||
);
|
||||
|
||||
/* move panner automation */
|
||||
boost::shared_ptr<Panner> p = _io->panner ();
|
||||
boost::shared_ptr<Panner> p = _route->main_outs()->panner ();
|
||||
if (p) {
|
||||
for (uint32_t i = 0; i < p->npanners (); ++i) {
|
||||
boost::shared_ptr<AutomationList> pan_alist = p->streampanner(i).pan_control()->alist();
|
||||
@ -459,11 +457,8 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove<nframes_t> > const &
|
||||
|
||||
/* move processor automation */
|
||||
/* XXX: ewww */
|
||||
Route * route = dynamic_cast<Route*> (_io);
|
||||
if (route) {
|
||||
route->foreach_processor (sigc::bind (sigc::mem_fun (*this, &Diskstream::move_processor_automation), movements_frames));
|
||||
}
|
||||
#endif
|
||||
|
||||
_route->foreach_processor (sigc::bind (sigc::mem_fun (*this, &Diskstream::move_processor_automation), movements_frames));
|
||||
}
|
||||
|
||||
void
|
||||
@ -495,3 +490,8 @@ Diskstream::move_processor_automation (boost::weak_ptr<Processor> p,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Diskstream::route_going_away ()
|
||||
{
|
||||
_io.reset ();
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ int
|
||||
MidiTrack::set_diskstream (boost::shared_ptr<MidiDiskstream> ds)
|
||||
{
|
||||
_diskstream = ds;
|
||||
_diskstream->set_io (*(_input.get()));
|
||||
_diskstream->set_route (*this);
|
||||
_diskstream->set_destructive (_mode == Destructive);
|
||||
|
||||
_diskstream->set_record_enabled (false);
|
||||
|
@ -2490,17 +2490,12 @@ Route::set_name (const string& str)
|
||||
|
||||
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
|
||||
/* rename all processors with outputs to reflect our new name */
|
||||
/* rename all I/O processors that have inputs or outputs */
|
||||
|
||||
boost::shared_ptr<IOProcessor> iop = boost::dynamic_pointer_cast<IOProcessor> (*i);
|
||||
|
||||
if (iop) {
|
||||
string iop_name = name;
|
||||
iop_name += '[';
|
||||
iop_name += "XXX FIX ME XXX";
|
||||
iop_name += ']';
|
||||
|
||||
if (!iop->set_name (iop_name)) {
|
||||
if (iop && (iop->output() || iop->input())) {
|
||||
if (!iop->set_name (name)) {
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ Session::butler_thread_work ()
|
||||
|
||||
/* don't read inactive tracks */
|
||||
|
||||
IO* io = ds->io();
|
||||
boost::shared_ptr<IO> io = ds->io();
|
||||
|
||||
if (io && !io->active()) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user