ardour
audio_track.cc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002 Paul Davis
3 
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.
8 
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.
13 
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.
17 
18 */
19 
20 #include <boost/scoped_array.hpp>
21 
22 #include "pbd/boost_debug.h"
23 #include "pbd/enumwriter.h"
24 #include "pbd/error.h"
25 
26 #include "evoral/Curve.hpp"
27 
28 #include "ardour/amp.h"
29 #include "ardour/audio_buffer.h"
31 #include "ardour/audio_track.h"
32 #include "ardour/audioplaylist.h"
33 #include "ardour/buffer_set.h"
34 #include "ardour/delivery.h"
35 #include "ardour/meter.h"
37 #include "ardour/processor.h"
38 #include "ardour/region.h"
39 #include "ardour/region_factory.h"
40 #include "ardour/session.h"
42 #include "ardour/source.h"
43 #include "ardour/utils.h"
44 
45 #include "i18n.h"
46 
47 using namespace std;
48 using namespace ARDOUR;
49 using namespace PBD;
50 
51 AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode mode)
52  : Track (sess, name, flag, mode)
53 {
54 }
55 
57 {
58 }
59 
62 {
64 
65  if (_mode == Destructive) {
67  } else if (_mode == NonLayered){
69  }
70 
72 }
73 
74 void
76 {
78 
79  _diskstream->set_track (this);
80  _diskstream->set_destructive (_mode == Destructive);
81  _diskstream->set_non_layered (_mode == NonLayered);
82 
83  if (audio_diskstream()->deprecated_io_node) {
84 
85  if (!IO::connecting_legal) {
86  IO::ConnectingLegal.connect_same_thread (*this, boost::bind (&AudioTrack::deprecated_use_diskstream_connections, this));
87  } else {
89  }
90  }
91 
92  _diskstream->set_record_enabled (false);
93  _diskstream->request_input_monitoring (false);
94 
95  DiskstreamChanged (); /* EMIT SIGNAL */
96 }
97 
100 {
102 }
103 
104 int
106 {
107  if (m != _mode) {
108 
109  if (_diskstream->set_destructive (m == Destructive)) {
110  return -1;
111  }
112 
113  _diskstream->set_non_layered (m == NonLayered);
114  _mode = m;
115 
116  TrackModeChanged (); /* EMIT SIGNAL */
117  }
118 
119  return 0;
120 }
121 
122 bool
123 AudioTrack::can_use_mode (TrackMode m, bool& bounce_required)
124 {
125  switch (m) {
126  case NonLayered:
127  case Normal:
128  bounce_required = false;
129  return true;
130 
131  case Destructive:
132  default:
133  return _diskstream->can_become_destructive (bounce_required);
134  }
135 }
136 
137 int
139 {
141 
142  if (diskstream->deprecated_io_node == 0) {
143  return 0;
144  }
145 
146  const XMLProperty* prop;
147  XMLNode& node (*diskstream->deprecated_io_node);
148 
149  /* don't do this more than once. */
150 
151  diskstream->deprecated_io_node = 0;
152 
153  if ((prop = node.property ("gain")) != 0) {
154  _amp->set_gain (atof (prop->value().c_str()), this);
155  }
156 
157  if ((prop = node.property ("input-connection")) != 0) {
159 
160  if (c == 0) {
161  error << string_compose(_("Unknown bundle \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
162 
163  if ((c = _session.bundle_by_name (_("in 1"))) == 0) {
164  error << _("No input bundles available as a replacement")
165  << endmsg;
166  return -1;
167  } else {
168  info << string_compose (_("Bundle %1 was not available - \"in 1\" used instead"), prop->value())
169  << endmsg;
170  }
171  }
172 
173  _input->connect_ports_to_bundle (c, true, this);
174 
175  } else if ((prop = node.property ("inputs")) != 0) {
176  if (_input->set_ports (prop->value())) {
177  error << string_compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg;
178  return -1;
179  }
180  }
181 
182  return 0;
183 }
184 
185 int
186 AudioTrack::set_state (const XMLNode& node, int version)
187 {
188  const XMLProperty *prop;
189 
190  if ((prop = node.property (X_("mode"))) != 0) {
191  _mode = TrackMode (string_2_enum (prop->value(), _mode));
192  } else {
193  _mode = Normal;
194  }
195 
196  if (Track::set_state (node, version)) {
197  return -1;
198  }
199 
200  pending_state = const_cast<XMLNode*> (&node);
201 
203  _session.StateReady.connect_same_thread (*this, boost::bind (&AudioTrack::set_state_part_two, this));
204  } else {
206  }
207 
208  return 0;
209 }
210 
211 XMLNode&
212 AudioTrack::state (bool full_state)
213 {
214  XMLNode& root (Track::state(full_state));
215  XMLNode* freeze_node;
216  char buf[64];
217 
218  if (_freeze_record.playlist) {
219  XMLNode* inode;
220 
221  freeze_node = new XMLNode (X_("freeze-info"));
222  freeze_node->add_property ("playlist", _freeze_record.playlist->name());
223  freeze_node->add_property ("state", enum_2_string (_freeze_record.state));
224 
225  for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
226  inode = new XMLNode (X_("processor"));
227  (*i)->id.print (buf, sizeof (buf));
228  inode->add_property (X_("id"), buf);
229  inode->add_child_copy ((*i)->state);
230 
231  freeze_node->add_child_nocopy (*inode);
232  }
233 
234  root.add_child_nocopy (*freeze_node);
235  }
236 
237  root.add_property (X_("mode"), enum_2_string (_mode));
238 
239  return root;
240 }
241 
242 void
244 {
245  XMLNode* fnode;
246  XMLProperty* prop;
247  LocaleGuard lg (X_("C"));
248 
249  /* This is called after all session state has been restored but before
250  have been made ports and connections are established.
251  */
252 
253  if (pending_state == 0) {
254  return;
255  }
256 
257  if ((fnode = find_named_node (*pending_state, X_("freeze-info"))) != 0) {
258 
260 
261  for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
262  delete *i;
263  }
265 
266  if ((prop = fnode->property (X_("playlist"))) != 0) {
267  boost::shared_ptr<Playlist> pl = _session.playlists->by_name (prop->value());
268  if (pl) {
270  } else {
273  return;
274  }
275  }
276 
277  if ((prop = fnode->property (X_("state"))) != 0) {
279  }
280 
281  XMLNodeConstIterator citer;
282  XMLNodeList clist = fnode->children();
283 
284  for (citer = clist.begin(); citer != clist.end(); ++citer) {
285  if ((*citer)->name() != X_("processor")) {
286  continue;
287  }
288 
289  if ((prop = (*citer)->property (X_("id"))) == 0) {
290  continue;
291  }
292 
293  FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo (*((*citer)->children().front()),
295  frii->id = prop->value ();
296  _freeze_record.processor_info.push_back (frii);
297  }
298  }
299 }
300 
304 int
305 AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler)
306 {
307  Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
308 
309  if (!lm.locked()) {
311  framecnt_t playback_distance = diskstream->calculate_playback_distance(nframes);
312  if (can_internal_playback_seek(llabs(playback_distance))) {
313  /* TODO should declick */
314  internal_playback_seek(playback_distance);
315  }
316  return 0;
317  }
318 
319  framepos_t transport_frame;
321 
322  if (n_outputs().n_total() == 0 && _processors.empty()) {
323  return 0;
324  }
325 
326  if (!_active) {
327  silence (nframes);
328  if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) {
329  _meter->reset();
330  }
331  return 0;
332  }
333 
334  transport_frame = _session.transport_frame();
335 
336  int dret;
337  framecnt_t playback_distance;
338 
339  if ((nframes = check_initial_delay (nframes, transport_frame)) == 0) {
340 
341  /* need to do this so that the diskstream sets its
342  playback distance to zero, thus causing diskstream::commit
343  to do nothing.
344  */
345 
346  BufferSet bufs; /* empty set, no matter - nothing will happen */
347 
348  dret = diskstream->process (bufs, transport_frame, 0, playback_distance, false);
349  need_butler = diskstream->commit (playback_distance);
350  return dret;
351  }
352 
353  if (_mute_control->list() && _mute_control->automation_playback()) {
354  bool valid = false;
355  const float mute = _mute_control->list()->rt_safe_eval(transport_frame, valid);
356  if (mute >= 0.5 && !muted()) {
357  _mute_control->set_value(1.0); // mute
358  } else if (mute < 0.5 && muted()) {
359  _mute_control->set_value(0.0); // unmute
360  }
361  }
362 
363  _silent = false;
364  _amp->apply_gain_automation(false);
365 
367 
368  fill_buffers_with_input (bufs, _input, nframes);
369 
370  if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) {
371  _meter->run (bufs, start_frame, end_frame, nframes, true);
372  }
373 
374  if ((dret = diskstream->process (bufs, transport_frame, nframes, playback_distance, (monitoring_state() == MonitoringDisk))) != 0) {
375  need_butler = diskstream->commit (playback_distance);
376  silence (nframes);
377  return dret;
378  }
379 
380  process_output_buffers (bufs, start_frame, end_frame, nframes, declick, (!diskstream->record_enabled() && _session.transport_rolling()));
381 
382  for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
384  if (d) {
385  d->flush_buffers (nframes);
386  }
387  }
388 
389  need_butler = diskstream->commit (playback_distance);
390 
391  return 0;
392 }
393 
394 int
396  boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze)
397 {
398  boost::scoped_array<gain_t> gain_buffer (new gain_t[nframes]);
399  boost::scoped_array<Sample> mix_buffer (new Sample[nframes]);
401 
402  Glib::Threads::RWLock::ReaderLock rlock (_processor_lock);
403 
405 
406  assert(apl);
407  assert(buffers.count().n_audio() >= 1);
408  assert ((framecnt_t) buffers.get_audio(0).capacity() >= nframes);
409 
410  if (apl->read (buffers.get_audio(0).data(), mix_buffer.get(), gain_buffer.get(), start, nframes) != nframes) {
411  return -1;
412  }
413 
414  uint32_t n=1;
415  Sample* b = buffers.get_audio(0).data();
416  BufferSet::audio_iterator bi = buffers.audio_begin();
417  ++bi;
418  for ( ; bi != buffers.audio_end(); ++bi, ++n) {
419  if (n < diskstream->n_channels().n_audio()) {
420  if (apl->read (bi->data(), mix_buffer.get(), gain_buffer.get(), start, nframes, n) != nframes) {
421  return -1;
422  }
423  b = bi->data();
424  } else {
425  /* duplicate last across remaining buffers */
426  memcpy (bi->data(), b, sizeof (Sample) * nframes);
427  }
428  }
429 
430  bounce_process (buffers, start, nframes, endpoint, include_endpoint, for_export, for_freeze);
431 
432  return 0;
433 }
434 
435 bool
436 AudioTrack::bounceable (boost::shared_ptr<Processor> endpoint, bool include_endpoint) const
437 {
438  if (!endpoint && !include_endpoint) {
439  /* no processing - just read from the playlist and create new
440  files: always possible.
441  */
442  return true;
443  }
444 
445  Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
446  uint32_t naudio = n_inputs().n_audio();
447 
448  for (ProcessorList::const_iterator r = _processors.begin(); r != _processors.end(); ++r) {
449 
450  /* if we're not including the endpoint, potentially stop
451  right here before we test matching i/o valences.
452  */
453 
454  if (!include_endpoint && (*r) == endpoint) {
455  return true;
456  }
457 
458  /* ignore any processors that do routing, because we will not
459  * use them during a bounce/freeze/export operation.
460  */
461 
462  if ((*r)->does_routing()) {
463  continue;
464  }
465 
466  /* does the output from the last considered processor match the
467  * input to this one?
468  */
469 
470  if (naudio != (*r)->input_streams().n_audio()) {
471  return false;
472  }
473 
474  /* we're including the endpoint - if we just hit it,
475  then stop.
476  */
477 
478  if ((*r) == endpoint) {
479  return true;
480  }
481 
482  /* save outputs of this processor to test against inputs
483  of the next one.
484  */
485 
486  naudio = (*r)->output_streams().n_audio();
487  }
488 
489  return true;
490 }
491 
494 {
496 }
497 
500  boost::shared_ptr<Processor> endpoint, bool include_endpoint)
501 {
502  vector<boost::shared_ptr<Source> > srcs;
503  return _session.write_one_track (*this, start, end, false, srcs, itt, endpoint, include_endpoint, false, false);
504 }
505 
506 void
508 {
509  vector<boost::shared_ptr<Source> > srcs;
510  string new_playlist_name;
511  boost::shared_ptr<Playlist> new_playlist;
512  string dir;
513  string region_name;
515 
516  if ((_freeze_record.playlist = boost::dynamic_pointer_cast<AudioPlaylist>(diskstream->playlist())) == 0) {
517  return;
518  }
519 
520  uint32_t n = 1;
521 
522  while (n < (UINT_MAX-1)) {
523 
524  string candidate;
525 
526  candidate = string_compose ("<F%2>%1", _freeze_record.playlist->name(), n);
527 
528  if (_session.playlists->by_name (candidate) == 0) {
529  new_playlist_name = candidate;
530  break;
531  }
532 
533  ++n;
534 
535  }
536 
537  if (n == (UINT_MAX-1)) {
538  error << string_compose (X_("There are too many frozen versions of playlist \"%1\""
539  " to create another one"), _freeze_record.playlist->name())
540  << endmsg;
541  return;
542  }
543 
545 
547  true, srcs, itt, main_outs(), false, false, true)) == 0) {
548  return;
549  }
550 
552 
553  {
554  Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
555 
556  for (ProcessorList::iterator r = _processors.begin(); r != _processors.end(); ++r) {
557 
558  if ((*r)->does_routing() && (*r)->active()) {
559  break;
560  }
561  if (!boost::dynamic_pointer_cast<PeakMeter>(*r)) {
562 
563  FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo ((*r)->get_state(), (*r));
564 
565  frii->id = (*r)->id();
566 
567  _freeze_record.processor_info.push_back (frii);
568 
569  /* now deactivate the processor, */
570  if (!boost::dynamic_pointer_cast<Amp>(*r)) {
571  (*r)->deactivate ();
572  }
573  }
574 
575  _session.set_dirty ();
576  }
577  }
578 
579  new_playlist = PlaylistFactory::create (DataType::AUDIO, _session, new_playlist_name, false);
580 
581  /* XXX need main outs automation state _freeze_record.pan_automation_state = _mainpanner->automation_state(); */
582 
583  region_name = new_playlist_name;
584 
585  /* create a new region from all filesources, keep it private */
586 
587  PropertyList plist;
588 
589  plist.add (Properties::start, 0);
590  plist.add (Properties::length, srcs[0]->length(srcs[0]->timeline_position()));
591  plist.add (Properties::name, region_name);
592  plist.add (Properties::whole_file, true);
593 
594  boost::shared_ptr<Region> region (RegionFactory::create (srcs, plist, false));
595 
596  new_playlist->set_orig_track_id (id());
597  new_playlist->add_region (region, _session.current_start_frame());
598  new_playlist->set_frozen (true);
599  region->set_locked (true);
600 
601  diskstream->use_playlist (boost::dynamic_pointer_cast<AudioPlaylist>(new_playlist));
602  diskstream->set_record_enabled (false);
603 
604  /* reset stuff that has already been accounted for in the freeze process */
605 
606  set_gain (GAIN_COEFF_UNITY, this);
607  _amp->gain_control()->set_automation_state (Off);
608  /* XXX need to use _main_outs _panner->set_automation_state (Off); */
609 
611  FreezeChange(); /* EMIT SIGNAL */
612 }
613 
614 void
616 {
617  if (_freeze_record.playlist) {
618  audio_diskstream()->use_playlist (_freeze_record.playlist);
619 
620  {
621  Glib::Threads::RWLock::ReaderLock lm (_processor_lock); // should this be a write lock? jlc
622  for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
623  for (vector<FreezeRecordProcessorInfo*>::iterator ii = _freeze_record.processor_info.begin(); ii != _freeze_record.processor_info.end(); ++ii) {
624  if ((*ii)->id == (*i)->id()) {
625  (*i)->set_state (((*ii)->state), Stateful::current_state_version);
626  break;
627  }
628  }
629  }
630  }
631 
633  /* XXX need to use _main_outs _panner->set_automation_state (_freeze_record.pan_automation_state); */
634  }
635 
637  FreezeChange (); /* EMIT SIGNAL */
638 }
639 
642 {
644  assert (ds);
645  return ds->write_source (n);
646 }
647 
650 {
652 }
framecnt_t read(Sample *dst, Sample *mixdown, float *gain_buffer, framepos_t start, framecnt_t cnt, uint32_t chan_n=0)
bool transport_rolling() const
Definition: session.h:592
void freeze_me(InterThreadInfo &)
Definition: audio_track.cc:507
ARDOUR::Session & _session
MeterPoint _meter_point
Definition: route.h:538
boost::shared_ptr< Region > write_one_track(Track &, framepos_t start, framepos_t end, bool overwrite, std::vector< boost::shared_ptr< Source > > &, InterThreadInfo &wot, boost::shared_ptr< Processor > endpoint, bool include_endpoint, bool for_export, bool for_freeze)
Definition: session.cc:4586
PBD::Signal0< void > TrackModeChanged
Definition: track.h:52
FreezeRecord _freeze_record
Definition: track.h:214
const std::string & value() const
Definition: xml++.h:159
bool _silent
Definition: route.h:550
boost::shared_ptr< AudioDiskstream > audio_diskstream() const
Definition: audio_track.cc:99
PBD::Signal0< void > DiskstreamChanged
Definition: track.h:163
virtual int set_state(const XMLNode &, int version)
Definition: track.cc:108
#define enum_2_string(e)
Definition: enumwriter.h:97
boost::shared_ptr< Amp > _amp
Definition: route.h:588
void flush_buffers(framecnt_t nframes)
Definition: delivery.cc:450
PBD::Signal0< void > FreezeChange
Definition: track.h:164
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r)
Definition: shared_ptr.hpp:396
void set_gain(gain_t val, void *src)
Definition: route.cc:371
LIBARDOUR_API PBD::PropertyDescriptor< std::string > name
boost::shared_ptr< Diskstream > create_diskstream()
Definition: audio_track.cc:61
void set_orig_track_id(const PBD::ID &did)
Definition: playlist.cc:3215
uint32_t pframes_t
Definition: types.h:61
uint32_t n_audio() const
Definition: chan_count.h:63
XMLNode * add_child_copy(const XMLNode &)
Definition: xml++.cc:363
int deprecated_use_diskstream_connections()
Definition: audio_track.cc:138
Definition: Beats.hpp:239
LIBPBD_API Transmitter error
bool _active
Definition: route.h:510
const XMLNodeList & children(const std::string &str=std::string()) const
Definition: xml++.cc:329
int export_stuff(BufferSet &bufs, framepos_t start_frame, framecnt_t nframes, boost::shared_ptr< Processor > endpoint, bool include_endpoint, bool for_export, bool for_freeze)
Definition: audio_track.cc:395
static PBD::Signal0< int > ConnectingLegal
Definition: io.h:185
ProcessorList _processors
Definition: route.h:517
float gain_t
Definition: types.h:58
static bool connecting_legal
Definition: io.h:186
std::ostream & endmsg(std::ostream &ostr)
Definition: transmitter.h:71
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > start
Definition: region.cc:63
frameoffset_t calculate_playback_distance(pframes_t nframes)
bool bounceable(boost::shared_ptr< Processor >, bool include_endpoint) const
Definition: audio_track.cc:436
AudioBuffer & get_audio(size_t i)
Definition: buffer_set.h:100
int process(BufferSet &, framepos_t transport_frame, pframes_t nframes, framecnt_t &, bool need_disk_signal)
boost::shared_ptr< Playlist > playlist
Definition: track.h:197
boost::shared_ptr< PeakMeter > _meter
Definition: route.h:590
XMLNode & state(bool full)
Definition: audio_track.cc:212
std::list< XMLNode * > XMLNodeList
Definition: xml++.h:44
int use_playlist(boost::shared_ptr< Playlist >)
PBD::Signal0< void > StateReady
Definition: session.h:442
boost::shared_ptr< AudioFileSource > write_source(uint32_t n=0)
#define _(Text)
Definition: i18n.h:11
XMLNode * pending_state
Definition: track.h:215
boost::shared_ptr< MuteControllable > _mute_control
Definition: route.h:554
void add_region(boost::shared_ptr< Region >, framepos_t position, float times=1, bool auto_partition=false)
Definition: playlist.cc:668
TrackMode
Definition: types.h:198
#define X_(Text)
Definition: i18n.h:13
static int current_state_version
Definition: stateful.h:89
int64_t framecnt_t
Definition: types.h:76
int roll(pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool &need_butler)
Definition: audio_track.cc:305
XMLProperty * property(const char *)
Definition: xml++.cc:413
float Sample
Definition: types.h:54
boost::shared_ptr< Region > bounce(InterThreadInfo &)
Definition: audio_track.cc:493
#define string_2_enum(str, e)
Definition: enumwriter.h:98
void silence(framecnt_t)
Definition: route.cc:2894
std::vector< FreezeRecordProcessorInfo * > processor_info
Definition: track.h:198
boost::shared_ptr< Region > bounce_range(framepos_t start, framepos_t end, InterThreadInfo &, boost::shared_ptr< Processor > endpoint, bool include_endpoint)
Definition: audio_track.cc:499
int internal_playback_seek(framecnt_t)
Definition: track.cc:686
audio_iterator audio_begin()
Definition: buffer_set.h:173
boost::shared_ptr< Delivery > main_outs() const
Definition: route.h:237
StateOfTheState state_of_the_state() const
Definition: session.h:480
framepos_t transport_frame() const
Definition: session.h:551
Definition: amp.h:29
int set_state(const XMLNode &, int version)
Definition: audio_track.cc:186
int set_mode(TrackMode m)
Definition: audio_track.cc:105
boost::shared_ptr< AudioFileSource > write_source(uint32_t n=0)
Definition: audio_track.cc:641
ChanCount n_outputs() const
Definition: route.h:93
bool record_enabled() const
Definition: diskstream.h:106
LIBARDOUR_API PBD::PropertyDescriptor< bool > mute
Definition: route_group.cc:45
bool can_use_mode(TrackMode m, bool &bounce_required)
Definition: audio_track.cc:123
int64_t framepos_t
Definition: types.h:66
MonitorChoice _monitoring
Definition: track.h:178
LIBARDOUR_API XMLNode * find_named_node(const XMLNode &node, std::string name)
audio_iterator audio_end()
Definition: buffer_set.h:174
PBD::Property< std::string > _name
ChanCount n_inputs() const
Definition: route.h:92
LIBPBD_API Transmitter info
bool muted() const
Definition: route.cc:1031
XMLProperty * add_property(const char *name, const std::string &value)
size_t capacity() const
Definition: buffer.h:51
BufferSet & get_route_buffers(ChanCount count=ChanCount::ZERO, bool silence=true)
Definition: session.cc:4857
boost::shared_ptr< IO > _input
Definition: route.h:507
MonitorState monitoring_state() const
Definition: track.cc:894
const char * name
void add_child_nocopy(XMLNode &)
Definition: xml++.cc:357
int can_internal_playback_seek(framecnt_t)
Definition: track.cc:680
ChanCount n_channels()
Definition: track.cc:777
framepos_t current_end_frame() const
Definition: session.cc:5048
void set_frozen(bool yn)
Definition: playlist.cc:2680
XMLNode & state(bool full)
Definition: track.cc:96
TrackMode _mode
Definition: track.h:176
framepos_t current_start_frame() const
Definition: session.cc:5042
Definition: xml++.h:95
std::string name() const
const ChanCount & count() const
Definition: buffer_set.h:87
framecnt_t check_initial_delay(framecnt_t nframes, framepos_t &)
Definition: track.cc:981
Definition: debug.h:30
boost::shared_ptr< Diskstream > diskstream_factory(XMLNode const &)
Definition: audio_track.cc:649
boost::shared_ptr< SessionPlaylists > playlists
Definition: session.h:907
virtual void process_output_buffers(BufferSet &bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, int declick, bool gain_automation_ok)
Definition: route.cc:457
boost::shared_ptr< Bundle > bundle_by_name(std::string) const
Definition: session.cc:4310
Glib::Threads::RWLock _processor_lock
Definition: route.h:518
boost::shared_ptr< Diskstream > _diskstream
Definition: track.h:174
const Sample * data(framecnt_t offset=0) const
Definition: audio_buffer.h:187
#define GAIN_COEFF_UNITY
Definition: dB.h:28
static boost::shared_ptr< Region > create(boost::shared_ptr< const Region > other, bool announce=false)
virtual void set_diskstream(boost::shared_ptr< Diskstream >)
Definition: track.cc:554
XMLNodeList::const_iterator XMLNodeConstIterator
Definition: xml++.h:49
void fill_buffers_with_input(BufferSet &bufs, boost::shared_ptr< IO > io, pframes_t nframes)
Definition: route.cc:4629
boost::shared_ptr< Playlist > playlist()
Definition: diskstream.h:127
static boost::shared_ptr< Playlist > create(Session &, const XMLNode &, bool hidden=false, bool unused=false)
virtual void bounce_process(BufferSet &bufs, framepos_t start_frame, framecnt_t nframes, boost::shared_ptr< Processor > endpoint, bool include_endpoint, bool for_export, bool for_freeze)
Definition: route.cc:609
bool add(PropertyBase *prop)
LIBARDOUR_API PBD::PropertyDescriptor< bool > whole_file
Definition: region.cc:54
ChanCount n_process_buffers()
Definition: route.cc:714
XMLNode * deprecated_io_node
Definition: diskstream.h:339
std::string string_compose(const std::string &fmt, const T1 &o1)
Definition: compose.h:208
void set_diskstream(boost::shared_ptr< Diskstream >)
Definition: audio_track.cc:75
void set_locked(bool yn)
Definition: region.cc:980
double atof(const string &s)
Definition: convert.cc:158
LIBARDOUR_API PBD::PropertyDescriptor< framecnt_t > length
Definition: region.cc:64