{
Track::set_diskstream (ds);
- _diskstream->set_track (this);
+ _diskstream->set_track (this);
_diskstream->set_destructive (_mode == Destructive);
_diskstream->set_non_layered (_mode == NonLayered);
}
}
- /* set rec-enable control *AFTER* setting up diskstream, because it may want to operate
- on the diskstream as it sets its own state
- */
+ /* set rec-enable control *AFTER* setting up diskstream, because it may want to operate
+ on the diskstream as it sets its own state
+ */
XMLNodeList nlist;
XMLNodeConstIterator niter;
for (niter = nlist.begin(); niter != nlist.end(); ++niter){
child = *niter;
- if (child->name() == Controllable::xml_node_name && (prop = child->property ("name")) != 0) {
- if (prop->value() == X_("recenable")) {
- _rec_enable_control->set_state (*child, version);
- }
- }
+ if (child->name() == Controllable::xml_node_name && (prop = child->property ("name")) != 0) {
+ if (prop->value() == X_("recenable")) {
+ _rec_enable_control->set_state (*child, version);
+ }
+ }
}
-
pending_state = const_cast<XMLNode*> (&node);
if (_session.state_of_the_state() & Session::Loading) {
int
AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
- bool can_record, bool rec_monitors_input, bool& need_butler)
+ bool can_record, bool& need_butler)
{
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
if (!lm.locked()) {
Sample* tmpb;
framepos_t transport_frame;
boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream();
-
+
automation_snapshot (start_frame, false);
if (n_outputs().n_total() == 0 && _processors.empty()) {
}
if (!_active) {
- silence (nframes);
+ silence (nframes);
return 0;
}
playback distance to zero, thus causing diskstream::commit
to do nothing.
*/
- cerr << name() << " Can't operate at " << transport_frame << " since roll delay is only " << _roll_delay << endl;
- return diskstream->process (transport_frame, 0, can_record, rec_monitors_input, need_butler);
+ return diskstream->process (transport_frame, 0, can_record, need_butler);
}
_silent = false;
_amp->apply_gain_automation(false);
- if ((dret = diskstream->process (transport_frame, nframes, can_record, rec_monitors_input, need_butler)) != 0) {
+ if ((dret = diskstream->process (transport_frame, nframes, can_record, need_butler)) != 0) {
silence (nframes);
return dret;
}
/* final argument: don't waste time with automation if we're recording or we've just stopped (yes it can happen) */
- process_output_buffers (bufs, start_frame, end_frame, nframes, (!_session.get_record_enabled() || !Config->get_do_not_record_plugins()), declick,
- (!diskstream->record_enabled() && _session.transport_rolling()));
-
+ process_output_buffers (
+ bufs, start_frame, end_frame, nframes,
+ (!_session.get_record_enabled() || !Config->get_do_not_record_plugins()),
+ declick,
+ (!diskstream->record_enabled() && _session.transport_rolling()));
} else {
/* problem with the diskstream; just be quiet for a bit */
Glib::RWLock::ReaderLock rlock (_processor_lock);
boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(diskstream->playlist());
- assert(apl);
+ assert(apl);
+ assert(buffers.count().n_audio() >= 1);
assert ((framecnt_t) buffers.get_audio(0).capacity() >= nframes);
if (apl->read (buffers.get_audio(0).data(), mix_buffer.get(), gain_buffer.get(), start, nframes) != nframes) {
return -1;
}
- assert(buffers.count().n_audio() >= 1);
uint32_t n=1;
Sample* b = buffers.get_audio(0).data();
BufferSet::audio_iterator bi = buffers.audio_begin();
return -1;
}
b = bi->data();
- }
- else {
+ } else {
/* duplicate last across remaining buffers */
memcpy (bi->data(), b, sizeof (Sample) * nframes);
}
boost::shared_ptr<Processor> processor = boost::dynamic_pointer_cast<Processor> (*i);
boost::shared_ptr<Delivery> delivery = boost::dynamic_pointer_cast<Delivery> (*i);
boost::shared_ptr<PeakMeter> meter = boost::dynamic_pointer_cast<PeakMeter> (*i);
-
+
if (processor && (!delivery || !Delivery::role_requires_output_ports (delivery->role())) && !meter) {
processor->run (buffers, start, start+nframes, nframes, true);
}
/* create a new region from all filesources, keep it private */
PropertyList plist;
-
+
plist.add (Properties::start, 0);
plist.add (Properties::length, srcs[0]->length(srcs[0]->timeline_position()));
plist.add (Properties::name, region_name);