On Sun, Jun 14, 2026 at 01:04:16PM +0200, 
[email protected] wrote:

> To make the plugin operate at any framebuffer without having to retrain
> the model for different buffersizes the idea is just to buffer the
> audio in an internal 256 sample buffer, should the host buffersize be
> smaller than 256,

Will work, but introduce an uneven CPU load. For example if the 
host size is 128 samples, most of the algorithm will run only
in every second period. Thus peak CPU load (which is what matters)
will appear to double.

> or run the plugin n times should the host buffersize
> be n*256, so that problem is solved.


> The question is how should I handle samplerates other than 48khz?
> I could implement simple interpolation schemes for samplerates lower
> than 48khz and subsampling for higher samplerates. What are the
> potholes? Are there libraries out there that can do this in real time
> in the audio thread?

Zita-resampler can easily do this in real time. Simpler solutions are
possible, with some loss of quality.

Ciao,

-- 
FA

Reply via email to