mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
NO-OP: return early, remove scope
This commit is contained in:
parent
3ce2cf937e
commit
576840c09e
1 changed files with 71 additions and 71 deletions
|
|
@ -267,7 +267,9 @@ MidiPort::resolve_notes (void* port_buffer, MidiBuffer::TimeType when)
|
||||||
void
|
void
|
||||||
MidiPort::flush_buffers (pframes_t nframes)
|
MidiPort::flush_buffers (pframes_t nframes)
|
||||||
{
|
{
|
||||||
if (sends_output ()) {
|
if (!sends_output ()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void* port_buffer = 0;
|
void* port_buffer = 0;
|
||||||
|
|
||||||
|
|
@ -288,14 +290,16 @@ MidiPort::flush_buffers (pframes_t nframes)
|
||||||
|
|
||||||
double speed_ratio = (flags () & TransportGenerator) ? 1.0 : resample_ratio ();
|
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) {
|
for (MidiBuffer::iterator i = _buffer->begin(); i != _buffer->end(); ++i) {
|
||||||
|
|
||||||
const Evoral::Event<MidiBuffer::TimeType> ev (*i, false);
|
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;
|
const samplepos_t adjusted_time = ev.time() + _global_port_buffer_offset;
|
||||||
|
|
||||||
if (sends_output()) {
|
/* MIDI Tracer */
|
||||||
std::shared_ptr<MIDI::Parser> trace_parser = _trace_parser.lock ();
|
|
||||||
if (trace_parser) {
|
if (trace_parser) {
|
||||||
uint8_t const * const buf = ev.buffer();
|
uint8_t const * const buf = ev.buffer();
|
||||||
const samplepos_t now = AudioEngine::instance()->sample_time_at_cycle_start();
|
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]);
|
trace_parser->scanner (buf[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// event times are in samples, relative to cycle start
|
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (DEBUG_ENABLED (DEBUG::MidiIO)) {
|
if (DEBUG_ENABLED (DEBUG::MidiIO)) {
|
||||||
|
|
@ -360,7 +361,6 @@ MidiPort::flush_buffers (pframes_t nframes)
|
||||||
_buffer->clear ();
|
_buffer->clear ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiPort::require_resolve ()
|
MidiPort::require_resolve ()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue