Delay Buffer (wdelay)

The wdelay object in liquid implements a an efficient digital delay line with a minimal amount of memory. Specifically, the transfer function is just

$$ H_d(z) = z^{-k} $$

where \(k\) is the number of samples of delay. The interface for the wdelay family of objects is listed below. While the interface is given for wdelayf for floating-point precision, equivalent interfaces exist for float complex with wdelaycf .

  • wdelayf_create(k) creates a new wdelayf object with a delay of \(k\) samples.
  • wdelayf_recreate(q,k) adjusts the delay size, preserving the internal state of the object.
  • wdelayf_destroy(q) destroys the object, freeing all internally-allocated memory.
  • wdelayf_print(q) prints the object's properties internal state to the standard output.
  • wdelayf_clear(q) clears the contents of the internal buffer by setting all values to zero.
  • wdelayf_read(q,y) reads the sample at the head of the buffer and stores it to the output pointer.
  • wdelayf_push(q,x) pushes a sample into the buffer.