diff options
author | Robin Gareus <robin@gareus.org> | 2019-07-17 16:22:44 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-07-17 17:30:43 +0200 |
commit | acf26b03a617eb4611a9810c490b6563f71556f3 (patch) | |
tree | 197879d0962a5193b7e20bc1b9481d0284f57758 /gtk2_ardour | |
parent | 45f1220aa5bcfd7b2dd4a064a4ba6683f4f6e27f (diff) |
FFT analysis: use actual latency
Ardour allows to override a plugin's reported latency. So far this
was not taken into account when plotting the phase/freq response.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/plugin_eq_gui.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc index 19ee2c9f1a..5b842d62a4 100644 --- a/gtk2_ardour/plugin_eq_gui.cc +++ b/gtk2_ardour/plugin_eq_gui.cc @@ -407,9 +407,15 @@ PluginEqGui::run_impulse_analysis () } samplepos_t sample_pos = 0; - samplecnt_t latency = _plugin->signal_latency (); + samplecnt_t latency = _plugin_insert->effective_latency (); samplecnt_t samples_remain = _buffer_size + latency; + /* Note: https://discourse.ardour.org/t/plugins-ladspa-questions/101292/15 + * Capture the complete response from the beginning, and more than "latency" samples, + * Then unwrap the phase-response corresponding to reported latency, leaving the + * magnitude unchanged. + */ + _impulse_fft->reset (); while (samples_remain > 0) { |