Fix MIDI Port-latencies
Only audio ports have additional latency due to I/O re-sampling for vari-speed playback/capture.. MIDI ports are not affected.
This commit is contained in:
parent
7f33d95937
commit
9091838b82
@ -365,8 +365,10 @@ Port::set_public_latency_range (LatencyRange const& range, bool playback) const
|
|||||||
r.min *= _speed_ratio;
|
r.min *= _speed_ratio;
|
||||||
r.max *= _speed_ratio;
|
r.max *= _speed_ratio;
|
||||||
#endif
|
#endif
|
||||||
r.min += (_resampler_quality - 1);
|
if (type () == DataType::AUDIO) {
|
||||||
r.max += (_resampler_quality - 1);
|
r.min += (_resampler_quality - 1);
|
||||||
|
r.max += (_resampler_quality - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
port_engine.set_latency_range (_port_handle, playback, r);
|
port_engine.set_latency_range (_port_handle, playback, r);
|
||||||
}
|
}
|
||||||
@ -429,8 +431,10 @@ Port::public_latency_range (bool /*playback*/) const
|
|||||||
r.min /= _speed_ratio;
|
r.min /= _speed_ratio;
|
||||||
r.max /= _speed_ratio;
|
r.max /= _speed_ratio;
|
||||||
#endif
|
#endif
|
||||||
r.min += (_resampler_quality - 1);
|
if (type () == DataType::AUDIO) {
|
||||||
r.max += (_resampler_quality - 1);
|
r.min += (_resampler_quality - 1);
|
||||||
|
r.max += (_resampler_quality - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Latency, string_compose (
|
DEBUG_TRACE (DEBUG::Latency, string_compose (
|
||||||
@ -476,8 +480,10 @@ Port::get_connected_latency_range (LatencyRange& range, bool playback) const
|
|||||||
lr.min /= _speed_ratio;
|
lr.min /= _speed_ratio;
|
||||||
lr.max /= _speed_ratio;
|
lr.max /= _speed_ratio;
|
||||||
#endif
|
#endif
|
||||||
lr.min += (_resampler_quality - 1);
|
if (type () == DataType::AUDIO) {
|
||||||
lr.max += (_resampler_quality - 1);
|
lr.min += (_resampler_quality - 1);
|
||||||
|
lr.max += (_resampler_quality - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Latency, string_compose (
|
DEBUG_TRACE (DEBUG::Latency, string_compose (
|
||||||
|
Loading…
Reference in New Issue
Block a user