}
void
-Delivery::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool result_required)
+Delivery::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, double /*speed*/, pframes_t nframes, bool result_required)
{
assert (_output);
PortSet& ports (_output->ports());
gain_t tgain;
+ if (ports.num_ports () == 0) {
+ goto out;
+ }
+
if (!_active && !_pending_active) {
_output->silence (nframes);
goto out;
}
/* this setup is not just for our purposes, but for anything that comes after us in the
- processing pathway that wants to use this->output_buffers() for some reason.
- */
+ * processing pathway that wants to use this->output_buffers() for some reason.
+ */
// TODO delayline -- latency-compensation
output_buffers().get_backend_port_addresses (ports, nframes);
} else if (tgain < GAIN_COEFF_SMALL) {
/* we were quiet last time, and we're still supposed to be quiet.
- Silence the outputs, and make sure the buffers are quiet too,
- */
+ Silence the outputs, and make sure the buffers are quiet too,
+ */
_output->silence (nframes);
if (result_required) {
Amp::apply_simple_gain (bufs, nframes, tgain);
}
- // Speed quietning
+ // Speed quietning
if (fabs (_session.transport_speed()) > 1.5 && Config->get_quieten_at_speed ()) {
Amp::apply_simple_gain (bufs, nframes, speed_quietning, false);
if (bufs.count().n_audio() > 0 && ports.count().n_audio () > 0) {
_output->copy_to_outputs (bufs, DataType::AUDIO, nframes, 0);
- }
+ }
if (bufs.count().n_midi() > 0 && ports.count().n_midi () > 0) {
_output->copy_to_outputs (bufs, DataType::MIDI, nframes, ports.port(0)->port_offset());
}
}
- if (result_required) {
- bufs.read_from (output_buffers (), nframes);
- }
+ if (result_required) {
+ bufs.read_from (output_buffers (), nframes);
+ }
- out:
+out:
_active = _pending_active;
}
int
Delivery::set_state (const XMLNode& node, int version)
{
- const XMLProperty* prop;
+ XMLProperty const * prop;
if (IOProcessor::set_state (node, version)) {
return -1;