2 Copyright (C) 2006 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #include "pbd/error.h"
20 #include "ardour/amp.h"
21 #include "ardour/audioengine.h"
22 #include "ardour/debug.h"
23 #include "ardour/delivery.h"
24 #include "ardour/disk_reader.h"
25 #include "ardour/disk_writer.h"
26 #include "ardour/event_type_map.h"
27 #include "ardour/io_processor.h"
28 #include "ardour/meter.h"
29 #include "ardour/monitor_control.h"
30 #include "ardour/playlist.h"
31 #include "ardour/playlist_factory.h"
32 #include "ardour/port.h"
33 #include "ardour/processor.h"
34 #include "ardour/profile.h"
35 #include "ardour/record_enable_control.h"
36 #include "ardour/record_safe_control.h"
37 #include "ardour/route_group_specialized.h"
38 #include "ardour/session.h"
39 #include "ardour/session_playlists.h"
40 #include "ardour/track.h"
41 #include "ardour/types_convert.h"
42 #include "ardour/utils.h"
47 using namespace ARDOUR;
50 Track::Track (Session& sess, string name, PresentationInfo::Flag flag, TrackMode mode, DataType default_type)
51 : Route (sess, name, flag, default_type)
52 , _saved_meter_point (_meter_point)
55 _freeze_record.state = NoFreeze;
61 DEBUG_TRACE (DEBUG::Destruction, string_compose ("track %1 destructor\n", _name));
71 DiskIOProcessor::Flag dflags = DiskIOProcessor::Recordable;
73 if (_mode == Destructive && !Profile->get_trx()) {
74 dflags = DiskIOProcessor::Flag (dflags | DiskIOProcessor::Destructive);
75 } else if (_mode == NonLayered){
76 dflags = DiskIOProcessor::Flag(dflags | DiskIOProcessor::NonLayered);
79 _disk_reader.reset (new DiskReader (_session, name(), dflags));
81 _disk_reader->set_block_size (_session.get_block_size ());
82 _disk_reader->set_route (shared_from_this());
83 _disk_reader->do_refill_with_alloc ();
85 _disk_writer.reset (new DiskWriter (_session, name(), dflags));
86 _disk_writer->set_block_size (_session.get_block_size ());
87 _disk_writer->set_route (shared_from_this());
91 add_processor (_disk_writer, PreFader);
92 add_processor (_disk_reader, PreFader);
94 boost::shared_ptr<Route> rp (boost::dynamic_pointer_cast<Route> (shared_from_this()));
95 boost::shared_ptr<Track> rt = boost::dynamic_pointer_cast<Track> (rp);
97 _record_enable_control.reset (new RecordEnableControl (_session, EventTypeMap::instance().to_symbol (RecEnableAutomation), *this));
98 add_control (_record_enable_control);
100 _record_safe_control.reset (new RecordSafeControl (_session, EventTypeMap::instance().to_symbol (RecSafeAutomation), *this));
101 add_control (_record_safe_control);
103 _monitoring_control.reset (new MonitorControl (_session, EventTypeMap::instance().to_symbol (MonitoringAutomation), *this));
104 add_control (_monitoring_control);
106 _session.config.ParameterChanged.connect_same_thread (*this, boost::bind (&Track::parameter_changed, this, _1));
108 _monitoring_control->Changed.connect_same_thread (*this, boost::bind (&Track::monitoring_changed, this, _1, _2));
109 _record_safe_control->Changed.connect_same_thread (*this, boost::bind (&Track::record_safe_changed, this, _1, _2));
110 _record_enable_control->Changed.connect_same_thread (*this, boost::bind (&Track::record_enable_changed, this, _1, _2));
122 Track::state (bool full)
124 XMLNode& root (Route::state (full));
126 if (_playlists[DataType::AUDIO]) {
127 root.add_property (X_("audio-playlist"), _playlists[DataType::AUDIO]->id().to_s());
130 if (_playlists[DataType::MIDI]) {
131 root.add_property (X_("midi-playlist"), _playlists[DataType::MIDI]->id().to_s());
134 root.add_child_nocopy (_monitoring_control->get_state ());
135 root.add_child_nocopy (_record_safe_control->get_state ());
136 root.add_child_nocopy (_record_enable_control->get_state ());
138 root.set_property (X_("saved-meter-point"), _saved_meter_point);
144 Track::set_state (const XMLNode& node, int version)
146 if (Route::set_state (node, version)) {
151 XMLProperty const * prop;
153 if (version >= 3000 && version < 4000) {
154 if ((child = find_named_node (node, X_("Diskstream"))) != 0) {
155 /* XXX DISK ... setup reader/writer from XML */
159 if ((prop = node.property (X_("audio-playlist")))) {
160 find_and_use_playlist (DataType::AUDIO, PBD::ID (prop->value()));
163 if ((prop = node.property (X_("midi-playlist")))) {
164 find_and_use_playlist (DataType::MIDI, PBD::ID (prop->value()));
167 XMLNodeList nlist = node.children();
168 for (XMLNodeConstIterator niter = nlist.begin(); niter != nlist.end(); ++niter) {
171 if (child->name() == Controllable::xml_node_name) {
173 if (!child->get_property ("name", name)) {
177 if (name == _record_enable_control->name()) {
178 _record_enable_control->set_state (*child, version);
179 } else if (name == _record_safe_control->name()) {
180 _record_safe_control->set_state (*child, version);
181 } else if (name == _monitoring_control->name()) {
182 _monitoring_control->set_state (*child, version);
187 if (!node.get_property (X_("saved-meter-point"), _saved_meter_point)) {
188 _saved_meter_point = _meter_point;
195 Track::get_template ()
197 return state (false);
200 Track::FreezeRecord::~FreezeRecord ()
202 for (vector<FreezeRecordProcessorInfo*>::iterator i = processor_info.begin(); i != processor_info.end(); ++i) {
208 Track::freeze_state() const
210 return _freeze_record.state;
216 bool will_record = true;
217 for (PortSet::iterator i = _input->ports().begin(); i != _input->ports().end() && will_record; ++i) {
226 Track::prep_record_enabled (bool yn)
228 if (yn && _record_safe_control->get_value()) {
232 if (!can_be_record_enabled()) {
236 /* keep track of the meter point as it was before we rec-enabled */
237 if (!_disk_writer->record_enabled()) {
238 _saved_meter_point = _meter_point;
244 will_follow = _disk_writer->prep_record_enable ();
246 will_follow = _disk_writer->prep_record_disable ();
251 if (_meter_point != MeterCustom) {
252 set_meter_point (MeterInput);
255 set_meter_point (_saved_meter_point);
263 Track::record_enable_changed (bool, Controllable::GroupControlDisposition)
265 _disk_writer->set_record_enabled (_record_enable_control->get_value());
269 Track::record_safe_changed (bool, Controllable::GroupControlDisposition)
271 _disk_writer->set_record_safe (_record_safe_control->get_value());
275 Track::can_be_record_safe ()
277 return !_record_enable_control->get_value() && _disk_writer && _session.writable() && (_freeze_record.state != Frozen);
281 Track::can_be_record_enabled ()
283 return !_record_safe_control->get_value() && _disk_writer && !_disk_writer->record_safe() && _session.writable() && (_freeze_record.state != Frozen);
287 Track::parameter_changed (string const & p)
289 if (p == "track-name-number") {
290 resync_track_name ();
292 else if (p == "track-name-take") {
293 resync_track_name ();
295 else if (p == "take-name") {
296 if (_session.config.get_track_name_take()) {
297 resync_track_name ();
303 Track::resync_track_name ()
309 Track::set_name (const string& str)
317 if (_record_enable_control->get_value()) {
318 /* when re-arm'ed the file (named after the track) is already ready to rolll */
322 string diskstream_name = "";
323 if (_session.config.get_track_name_take () && !_session.config.get_take_name ().empty()) {
324 // Note: any text is fine, legalize_for_path() fixes this later
325 diskstream_name += _session.config.get_take_name ();
326 diskstream_name += "_";
328 const int64_t tracknumber = track_number();
329 if (tracknumber > 0 && _session.config.get_track_name_number()) {
330 char num[64], fmt[10];
331 snprintf(fmt, sizeof(fmt), "%%0%d" PRId64, _session.track_number_decimals());
332 snprintf(num, sizeof(num), fmt, tracknumber);
333 diskstream_name += num;
334 diskstream_name += "_";
336 diskstream_name += str;
338 if (diskstream_name == _diskstream_name) {
341 _diskstream_name = diskstream_name;
343 _disk_writer->set_write_source_name (diskstream_name);
345 boost::shared_ptr<Track> me = boost::dynamic_pointer_cast<Track> (shared_from_this ());
346 if (_playlists[data_type()]->all_regions_empty () && _session.playlists->playlists_for_track (me).size() == 1) {
347 /* Only rename the diskstream (and therefore the playlist) if
348 a) the playlist has never had a region added to it and
349 b) there is only one playlist for this track.
351 If (a) is not followed, people can get confused if, say,
352 they have notes about a playlist with a given name and then
353 it changes (see mantis #4759).
355 If (b) is not followed, we rename the current playlist and not
356 the other ones, which is a bit confusing (see mantis #4977).
358 _disk_reader->set_name (str);
359 _disk_writer->set_name (str);
362 /* save state so that the statefile fully reflects any filename changes */
364 if ((ret = Route::set_name (str)) == 0) {
365 _session.save_state ("");
372 Track::set_latency_compensation (framecnt_t longest_session_latency)
374 Route::set_latency_compensation (longest_session_latency);
375 _disk_reader->set_roll_delay (_roll_delay);
379 Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool session_state_changing)
381 Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
387 bool can_record = _session.actively_recording ();
389 /* no outputs? nothing to do ... what happens if we have sends etc. ? */
391 if (n_outputs().n_total() == 0 && !ARDOUR::Profile->get_mixbus()) {
392 //Note: Mixbus has its own output mechanism, so we should operate even if no explicit outputs are assigned
396 /* not active ... do the minimum possible by just outputting silence */
400 if (_meter_point == MeterInput && ((_monitoring_control->monitoring_choice() & MonitorInput) || _disk_writer->record_enabled())) {
406 if (session_state_changing) {
407 if (_session.transport_speed() != 0.0f) {
408 /* we're rolling but some state is changing (e.g. our
409 disk reader contents) so we cannot use them. Be
410 silent till this is over. Don't declick.
412 XXX note the absurdity of ::no_roll() being called when we ARE rolling!
414 passthru_silence (start_frame, end_frame, nframes, 0);
417 /* we're really not rolling, so we're either delivery silence or actually
418 monitoring, both of which are safe to do while session_state_changing is true.
422 _disk_writer->check_record_status (start_frame, can_record);
426 MonitorState const s = monitoring_state ();
427 /* we are not rolling, so be silent even if we are monitoring disk, as there
428 will be no disk data coming in.
431 case MonitoringSilence:
437 case MonitoringInput:
445 //if we have an internal generator, let it play regardless of monitoring state
446 if (_have_internal_generator) {
450 _amp->apply_gain_automation (false);
452 /* if have_internal_generator, or .. */
456 if (_meter_point == MeterInput) {
457 /* still need input monitoring and metering */
459 bool const track_rec = _disk_writer->record_enabled ();
460 bool const auto_input = _session.config.get_auto_input ();
461 bool const software_monitor = Config->get_monitoring_model() == SoftwareMonitoring;
462 bool const tape_machine_mode = Config->get_tape_machine_mode ();
463 bool no_meter = false;
465 /* this needs a proper K-map
466 * and should be separated into a function similar to monitoring_state()
467 * that also handles roll() states in audio_track.cc, midi_track.cc and route.cc
469 * see http://www.oofus.co.uk/ardour/Ardour3MonitorModesV3.pdf
471 if (!auto_input && !track_rec) {
474 else if (tape_machine_mode && !track_rec && auto_input) {
477 else if (!software_monitor && tape_machine_mode && !track_rec) {
480 else if (!software_monitor && !tape_machine_mode && !track_rec && !auto_input) {
485 BufferSet& bufs (_session.get_silent_buffers (n_process_buffers()));
486 _meter->run (bufs, start_frame, end_frame, 1.0, nframes, true);
487 _input->process_input (boost::shared_ptr<Processor>(), start_frame, end_frame, speed(), nframes);
489 _input->process_input (_meter, start_frame, end_frame, speed(), nframes);
493 passthru_silence (start_frame, end_frame, nframes, 0);
497 BufferSet& bufs = _session.get_route_buffers (n_process_buffers());
499 fill_buffers_with_input (bufs, _input, nframes);
501 if (_meter_point == MeterInput) {
502 _meter->run (bufs, start_frame, end_frame, 1.0 /*speed()*/, nframes, true);
505 passthru (bufs, start_frame, end_frame, nframes, false);
508 flush_processor_buffers_locked (nframes);
514 Track::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /*end_frame*/, bool& need_butler)
516 Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
518 // XXX DISK reader needs to seek ahead the correct distance ?? OR DOES IT ?
519 //framecnt_t playback_distance = _disk_reader->calculate_playback_distance(nframes);
520 //if (can_internal_playback_seek(playback_distance)) {
521 // internal_playback_seek(playback_distance);
526 if (n_outputs().n_total() == 0 && _processors.empty()) {
536 _amp->apply_gain_automation(false);
539 flush_processor_buffers_locked (nframes);
541 //BufferSet& bufs (_session.get_route_buffers (n_process_buffers(), true));
542 // XXXX DISKWRITER/READER ADVANCE, SET need_butler
546 boost::shared_ptr<Playlist>
549 cerr << name() << " lookup " << data_type().to_string() << " pl's\n";
550 return _playlists[data_type()];
554 Track::request_input_monitoring (bool m)
556 for (PortSet::iterator i = _input->ports().begin(); i != _input->ports().end(); ++i) {
557 AudioEngine::instance()->request_input_monitoring ((*i)->name(), m);
562 Track::ensure_input_monitoring (bool m)
564 for (PortSet::iterator i = _input->ports().begin(); i != _input->ports().end(); ++i) {
565 AudioEngine::instance()->ensure_input_monitoring ((*i)->name(), m);
570 Track::destructive () const
572 return _disk_writer->destructive ();
575 list<boost::shared_ptr<Source> > &
576 Track::last_capture_sources ()
578 return _disk_writer->last_capture_sources ();
582 Track::set_capture_offset ()
584 _disk_writer->set_capture_offset ();
588 Track::steal_write_source_name()
590 return _disk_writer->steal_write_source_name ();
594 Track::reset_write_sources (bool r, bool force)
596 _disk_writer->reset_write_sources (r, force);
600 Track::playback_buffer_load () const
602 return _disk_reader->buffer_load ();
606 Track::capture_buffer_load () const
608 return _disk_writer->buffer_load ();
614 return _disk_reader->do_refill ();
618 Track::do_flush (RunContext c, bool force)
620 return _disk_writer->do_flush (c, force);
624 Track::set_pending_overwrite (bool o)
626 _disk_reader->set_pending_overwrite (o);
630 Track::seek (framepos_t p, bool complete_refill)
632 if (_disk_reader->seek (p, complete_refill)) {
635 return _disk_writer->seek (p, complete_refill);
639 Track::hidden () const
641 return _disk_writer->hidden () || _disk_reader->hidden();
645 Track::can_internal_playback_seek (framecnt_t p)
647 return _disk_reader->can_internal_playback_seek (p);
651 Track::internal_playback_seek (framecnt_t p)
653 return _disk_reader->internal_playback_seek (p);
657 Track::non_realtime_locate (framepos_t p)
659 Route::non_realtime_locate (p);
662 /* don't waste i/o cycles and butler calls
663 for hidden (secret) tracks
665 _disk_reader->non_realtime_locate (p);
666 _disk_writer->non_realtime_locate (p);
671 Track::non_realtime_set_speed ()
673 _disk_reader->non_realtime_set_speed ();
677 Track::overwrite_existing_buffers ()
679 return _disk_reader->overwrite_existing_buffers ();
683 Track::get_captured_frames (uint32_t n) const
685 return _disk_writer->get_captured_frames (n);
689 Track::set_loop (Location* l)
691 if (_disk_reader->set_loop (l)) {
694 return _disk_writer->set_loop (l);
698 Track::transport_looped (framepos_t p)
700 return _disk_writer->transport_looped (p);
704 Track::realtime_set_speed (double s, bool g)
706 if (_disk_reader->realtime_set_speed (s, g)) {
709 return _disk_writer->realtime_set_speed (s, g);
713 Track::transport_stopped_wallclock (struct tm & n, time_t t, bool g)
715 _disk_writer->transport_stopped_wallclock (n, t, g);
719 Track::pending_overwrite () const
721 return _disk_reader->pending_overwrite ();
725 Track::speed () const
727 return _disk_reader->speed ();
731 Track::prepare_to_stop (framepos_t t, framepos_t a)
733 _disk_writer->prepare_to_stop (t, a);
737 Track::set_slaved (bool s)
739 _disk_reader->set_slaved (s);
740 _disk_writer->set_slaved (s);
746 return _disk_reader->output_streams(); // XXX DISK
750 Track::get_capture_start_frame (uint32_t n) const
752 return _disk_writer->get_capture_start_frame (n);
756 Track::alignment_style () const
758 return _disk_writer->alignment_style ();
762 Track::alignment_choice () const
764 return _disk_writer->alignment_choice ();
768 Track::current_capture_start () const
770 return _disk_writer->current_capture_start ();
774 Track::current_capture_end () const
776 return _disk_writer->current_capture_end ();
780 Track::playlist_modified ()
782 _disk_reader->playlist_modified ();
786 Track::find_and_use_playlist (DataType dt, PBD::ID const & id)
788 boost::shared_ptr<Playlist> playlist;
790 if ((playlist = _session.playlists->by_id (id)) == 0) {
795 error << string_compose(_("DiskIOProcessor: \"%1\" isn't an playlist"), id.to_s()) << endmsg;
799 return use_playlist (dt, playlist);
803 Track::use_playlist (DataType dt, boost::shared_ptr<Playlist> p)
807 if ((ret = _disk_reader->use_playlist (dt, p)) == 0) {
808 if ((ret = _disk_writer->use_playlist (dt, p)) == 0) {
809 p->set_orig_track_id (id());
821 Track::use_copy_playlist ()
823 assert (_playlists[data_type()]);
825 if (_playlists[data_type()] == 0) {
826 error << string_compose(_("DiskIOProcessor %1: there is no existing playlist to make a copy of!"), _name) << endmsg;
831 boost::shared_ptr<Playlist> playlist;
833 newname = Playlist::bump_name (_playlists[data_type()]->name(), _session);
835 if ((playlist = PlaylistFactory::create (_playlists[data_type()], newname)) == 0) {
839 playlist->reset_shares();
841 return use_playlist (data_type(), playlist);
845 Track::use_new_playlist ()
848 boost::shared_ptr<Playlist> playlist = _playlists[data_type()];
851 newname = Playlist::bump_name (playlist->name(), _session);
853 newname = Playlist::bump_name (_name, _session);
856 playlist = PlaylistFactory::create (data_type(), _session, newname, hidden());
862 return use_playlist (data_type(), playlist);
866 Track::set_align_style (AlignStyle s, bool force)
872 Track::set_align_choice (AlignChoice s, bool force)
878 Track::set_block_size (pframes_t n)
880 Route::set_block_size (n);
881 _disk_reader->set_block_size (n);
882 _disk_writer->set_block_size (n);
886 Track::adjust_playback_buffering ()
889 _disk_reader->adjust_buffering ();
894 Track::adjust_capture_buffering ()
897 _disk_writer->adjust_buffering ();
901 #ifdef USE_TRACKS_CODE_FEATURES
903 /* This is the Tracks version of Track::monitoring_state().
905 * Ardour developers: try to flag or fix issues if parts of the libardour API
906 * change in ways that invalidate this
910 Track::monitoring_state () const
912 /* Explicit requests */
914 if (_monitoring & MonitorInput) {
915 return MonitoringInput;
918 if (_monitoring & MonitorDisk) {
919 return MonitoringDisk;
922 /* This is an implementation of the truth table in doc/monitor_modes.pdf;
923 I don't think it's ever going to be too pretty too look at.
926 // GZ: NOT USED IN TRACKS
927 //bool const auto_input = _session.config.get_auto_input ();
928 //bool const software_monitor = Config->get_monitoring_model() == SoftwareMonitoring;
929 //bool const tape_machine_mode = Config->get_tape_machine_mode ();
931 bool const roll = _session.transport_rolling ();
932 bool const track_rec = _diskstream->record_enabled ();
933 bool session_rec = _session.actively_recording ();
937 if (!session_rec && roll) {
938 return MonitoringDisk;
940 return MonitoringInput;
946 return MonitoringDisk;
950 return MonitoringSilence;
955 /* This is the Ardour/Mixbus version of Track::monitoring_state().
957 * Tracks developers: do NOT modify this method under any circumstances.
961 Track::monitoring_state () const
963 /* Explicit requests */
964 MonitorChoice m (_monitoring_control->monitoring_choice());
966 if (m & MonitorInput) {
967 return MonitoringInput;
970 if (m & MonitorDisk) {
971 return MonitoringDisk;
974 switch (_session.config.get_session_monitoring ()) {
976 return MonitoringDisk;
979 return MonitoringInput;
985 /* This is an implementation of the truth table in doc/monitor_modes.pdf;
986 I don't think it's ever going to be too pretty too look at.
989 bool const roll = _session.transport_rolling ();
990 bool const track_rec = _disk_writer->record_enabled ();
991 bool const auto_input = _session.config.get_auto_input ();
992 bool const software_monitor = Config->get_monitoring_model() == SoftwareMonitoring;
993 bool const tape_machine_mode = Config->get_tape_machine_mode ();
996 /* I suspect that just use actively_recording() is good enough all the
997 * time, but just to keep the semantics the same as they were before
998 * sept 26th 2012, we differentiate between the cases where punch is
999 * enabled and those where it is not.
1001 * rg: I suspect this is not the case: monitoring may differ
1004 if (_session.config.get_punch_in() || _session.config.get_punch_out() || _session.preroll_record_punch_enabled ()) {
1005 session_rec = _session.actively_recording ();
1007 session_rec = _session.get_record_enabled();
1012 if (!session_rec && roll && auto_input) {
1013 return MonitoringDisk;
1015 return software_monitor ? MonitoringInput : MonitoringSilence;
1020 if (tape_machine_mode) {
1022 return MonitoringDisk;
1026 if (!roll && auto_input) {
1027 return software_monitor ? MonitoringInput : MonitoringSilence;
1029 return MonitoringDisk;
1035 abort(); /* NOTREACHED */
1036 return MonitoringSilence;
1042 Track::maybe_declick (BufferSet& bufs, framecnt_t nframes, int declick)
1044 /* never declick if there is an internal generator - we just want it to
1045 keep generating sound without interruption.
1047 ditto if we are monitoring inputs.
1050 if (_have_internal_generator || (_monitoring_control->monitoring_choice() == MonitorInput)) {
1055 declick = _pending_declick;
1059 Amp::declick (bufs, nframes, declick);
1064 Track::check_initial_delay (framecnt_t nframes, framepos_t& transport_frame)
1066 if (_roll_delay > nframes) {
1068 _roll_delay -= nframes;
1069 silence_unlocked (nframes);
1070 /* transport frame is not legal for caller to use */
1073 } else if (_roll_delay > 0) {
1075 nframes -= _roll_delay;
1076 silence_unlocked (_roll_delay);
1077 transport_frame += _roll_delay;
1079 /* shuffle all the port buffers for things that lead "out" of this Route
1080 to reflect that we just wrote _roll_delay frames of silence.
1083 Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
1084 for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
1085 boost::shared_ptr<IOProcessor> iop = boost::dynamic_pointer_cast<IOProcessor> (*i);
1087 iop->increment_port_buffer_offset (_roll_delay);
1090 _output->increment_port_buffer_offset (_roll_delay);
1100 Track::monitoring_changed (bool, Controllable::GroupControlDisposition)
1102 for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
1103 (*i)->monitoring_changed ();
1108 Track::metering_state () const
1111 if (_session.transport_rolling ()) {
1112 // audio_track.cc || midi_track.cc roll() runs meter IFF:
1113 rv = _meter_point == MeterInput && ((_monitoring_control->monitoring_choice() & MonitorInput) || _disk_writer->record_enabled());
1115 // track no_roll() always metering if
1116 rv = _meter_point == MeterInput;
1118 return rv ? MeteringInput : MeteringRoute;