Move the code to loop over all channels in the resampler itself. This is better because the resampler can reuse its state for each channel.
Only passthrough buffer data when the buffer and ports are marked as DYNAMIC. Use extra buffer for nodes that keep a ref on buffers (resample).
Add some const and SPA_RESTRICT to methods When the input and output is the same, work in passthrough mode where we simply copy place the input pointer onto the output buffer without doing a memcpy. Do memcpy when the resampler is not active.