PLUG'N SCRIPT
rapid plugin development
Tutorial
DSP
KUIML
How-to
Scripts
Main functions
  • processBlock
  • processSample
  • updateInputParameters
  • updateInputParametersForBlock
  • computeOutputData
Additional
  • initialize
  • shutdown
  • reset
  • getTailSize
  • getLatency
  • wantSilence
DSPgetLatency
December 27, 2021

getLatency

This function reports to the DAW the latency introduced by your plugin, if any.

  1. int getLatency() {
  2. return 1024; // in samples
  3. }

Certain DSP algorithms (such as FIR filters, look-ahead limiters, etc) introduce a delay. This typically occurs when a collection of audio samples needs to be accumulated before processing.

If your plugin introduces such a delay, you can report it here (in samples), and the DAW will compensate for it. This ensures that all audio across tracks remains properly aligned.

For simple processing tasks, such as gain adjustments or basic distortion, which do not introduce any delay, you can return 0 or omit this function entirely.


Comments

Please, authorize to view and post comments.

2020 - 2026 © Site by LetiMix · Donate  |  Plug'n Script and KUIML by Blue Cat Audio