NO-OP: return early, remove scope
This commit is contained in:
parent
3ce2cf937e
commit
576840c09e
@ -267,7 +267,9 @@ MidiPort::resolve_notes (void* port_buffer, MidiBuffer::TimeType when)
|
||||
void
|
||||
MidiPort::flush_buffers (pframes_t nframes)
|
||||
{
|
||||
if (sends_output ()) {
|
||||
if (!sends_output ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
void* port_buffer = 0;
|
||||
|
||||
@ -288,14 +290,16 @@ MidiPort::flush_buffers (pframes_t nframes)
|
||||
|
||||
double speed_ratio = (flags () & TransportGenerator) ? 1.0 : resample_ratio ();
|
||||
|
||||
std::shared_ptr<MIDI::Parser> trace_parser = _trace_parser.lock ();
|
||||
|
||||
for (MidiBuffer::iterator i = _buffer->begin(); i != _buffer->end(); ++i) {
|
||||
|
||||
const Evoral::Event<MidiBuffer::TimeType> ev (*i, false);
|
||||
|
||||
/* event times are in samples, relative to cycle start */
|
||||
const samplepos_t adjusted_time = ev.time() + _global_port_buffer_offset;
|
||||
|
||||
if (sends_output()) {
|
||||
std::shared_ptr<MIDI::Parser> trace_parser = _trace_parser.lock ();
|
||||
/* MIDI Tracer */
|
||||
if (trace_parser) {
|
||||
uint8_t const * const buf = ev.buffer();
|
||||
const samplepos_t now = AudioEngine::instance()->sample_time_at_cycle_start();
|
||||
@ -308,9 +312,6 @@ MidiPort::flush_buffers (pframes_t nframes)
|
||||
trace_parser->scanner (buf[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// event times are in samples, relative to cycle start
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (DEBUG_ENABLED (DEBUG::MidiIO)) {
|
||||
@ -359,7 +360,6 @@ MidiPort::flush_buffers (pframes_t nframes)
|
||||
if (!AudioEngine::instance()->session()->exporting ()) {
|
||||
_buffer->clear ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user