Remove Input-meter special-case
Now that disk is no longer topper-most but a processor, the special case is no longer needed.
This commit is contained in:
parent
45336723f9
commit
de4c0eb27c
|
@ -480,9 +480,6 @@ Route::process_output_buffers (BufferSet& bufs,
|
|||
and go ....
|
||||
----------------------------------------------------------------------------------------- */
|
||||
|
||||
/* set this to be true if the meter will already have been ::run() earlier */
|
||||
bool const meter_already_run = metering_state() == MeteringInput;
|
||||
|
||||
samplecnt_t latency = 0;
|
||||
|
||||
for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
|
@ -493,11 +490,6 @@ Route::process_output_buffers (BufferSet& bufs,
|
|||
* cross loop points.
|
||||
*/
|
||||
|
||||
if (meter_already_run && boost::dynamic_pointer_cast<PeakMeter> (*i)) {
|
||||
/* don't ::run() the meter, otherwise it will have its previous peak corrupted */
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
/* if it has any inputs, make sure they match */
|
||||
if (boost::dynamic_pointer_cast<UnknownProcessor> (*i) == 0 && (*i)->input_streams() != ChanCount::ZERO) {
|
||||
|
@ -3689,10 +3681,6 @@ Route::no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_
|
|||
/* filter captured data before meter sees it */
|
||||
filter_input (bufs);
|
||||
|
||||
if (_meter_point == MeterInput) {
|
||||
_meter->run (bufs, start_sample, end_sample, 0.0, nframes, true);
|
||||
}
|
||||
|
||||
passthru (bufs, start_sample, end_sample, nframes, 0, true, false);
|
||||
|
||||
flush_processor_buffers_locked (nframes);
|
||||
|
@ -3768,11 +3756,6 @@ Route::roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample
|
|||
/* filter captured data before meter sees it */
|
||||
filter_input (bufs);
|
||||
|
||||
if (_meter_point == MeterInput &&
|
||||
((_monitoring_control->monitoring_choice() & MonitorInput) || (_disk_writer && _disk_writer->record_enabled()))) {
|
||||
_meter->run (bufs, start_sample, end_sample, 1.0 /*speed()*/, nframes, true);
|
||||
}
|
||||
|
||||
passthru (bufs, start_sample, end_sample, nframes, declick, (!_disk_writer || !_disk_writer->record_enabled()) && _session.transport_rolling(), true);
|
||||
|
||||
if ((_disk_reader && _disk_reader->need_butler()) || (_disk_writer && _disk_writer->need_butler())) {
|
||||
|
@ -4724,28 +4707,12 @@ Route::setup_invisible_processors ()
|
|||
ProcessorList::iterator after_amp = amp;
|
||||
++after_amp;
|
||||
|
||||
/* METER */
|
||||
/* Pre-fader METER */
|
||||
|
||||
if (_meter) {
|
||||
switch (_meter_point) {
|
||||
case MeterInput:
|
||||
assert (!_meter->display_to_user ());
|
||||
new_processors.push_front (_meter);
|
||||
break;
|
||||
case MeterPreFader:
|
||||
assert (!_meter->display_to_user ());
|
||||
new_processors.insert (amp, _meter);
|
||||
break;
|
||||
case MeterPostFader:
|
||||
/* do nothing here */
|
||||
break;
|
||||
case MeterOutput:
|
||||
/* do nothing here */
|
||||
break;
|
||||
case MeterCustom:
|
||||
/* the meter is visible, so we don't touch it here */
|
||||
break;
|
||||
}
|
||||
if (_meter && _meter_point == MeterPreFader) {
|
||||
/* add meter just before the fader */
|
||||
assert (!_meter->display_to_user ());
|
||||
new_processors.insert (amp, _meter);
|
||||
}
|
||||
|
||||
/* MAIN OUTS */
|
||||
|
@ -4897,6 +4864,21 @@ Route::setup_invisible_processors ()
|
|||
}
|
||||
}
|
||||
|
||||
/* Input meter */
|
||||
if (_meter && _meter_point == MeterInput) {
|
||||
/* add meter just before the disk-writer (if any)
|
||||
* otherwise at the top, but after the latency delayline
|
||||
* (perhaps it should also be after intreturn on busses ??)
|
||||
*/
|
||||
assert (!_meter->display_to_user ());
|
||||
ProcessorList::iterator writer_pos = find (new_processors.begin(), new_processors.end(), _disk_writer);
|
||||
if (writer_pos != new_processors.end()) {
|
||||
new_processors.insert (writer_pos, _meter);
|
||||
} else {
|
||||
new_processors.push_front (_meter);
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_master() && !is_monitor() && !is_auditioner()) {
|
||||
ProcessorList::iterator reader_pos = find (new_processors.begin(), new_processors.end(), _disk_reader);
|
||||
if (reader_pos != new_processors.end()) {
|
||||
|
|
|
@ -465,6 +465,8 @@ Track::no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_
|
|||
*/
|
||||
}
|
||||
|
||||
// XXX this needs to go away.. disk-reader or Route::process_output_buffers needs to handle this XXX //
|
||||
|
||||
bool be_silent;
|
||||
MonitorState const s = monitoring_state ();
|
||||
/* we are not rolling, so be silent even if we are monitoring disk, as there
|
||||
|
@ -494,6 +496,9 @@ Track::no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_
|
|||
|
||||
if (be_silent) {
|
||||
|
||||
#if 0
|
||||
// XXX this is also the only user of IO::process_input ()
|
||||
|
||||
if (_meter_point == MeterInput) {
|
||||
/* still need input monitoring and metering */
|
||||
|
||||
|
@ -530,6 +535,7 @@ Track::no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_
|
|||
_input->process_input (_meter, start_sample, end_sample, _session.transport_speed(), nframes);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
passthru_silence (start_sample, end_sample, nframes, 0);
|
||||
|
||||
|
@ -539,10 +545,6 @@ Track::no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_
|
|||
|
||||
fill_buffers_with_input (bufs, _input, nframes);
|
||||
|
||||
if (_meter_point == MeterInput) {
|
||||
_meter->run (bufs, start_sample, end_sample, _session.transport_speed(), nframes, true);
|
||||
}
|
||||
|
||||
passthru (bufs, start_sample, end_sample, nframes, false, true, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user