roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.09k stars 213 forks source link

Implement IResampler using Libzita-resampler #756

Open gavv opened 4 months ago

gavv commented 4 months ago

We have IResampler interface that abstracts sample rate conversion backend. There are two major implementations: hand-crafted BuiltinResampler, and SpeexResampler that uses SpeexDSP library.

Now we need to add another implementation, ZitaResampler, that will use Libzita-resampler library (home page, documentation). The implementation would be pretty similar to SpeexResampler.

New resampler should be added to ResamplerMap. Also it should be added to the list of tested backends in test_resampler.cpp.

Note that our resampler interface allows to change frequency ratio smoothly and dynamically via set_scaling() method. This is so because we use resampler for clock drift compensation. See this page for more details on how resampler is used. See also #235 for some background and rationale.

novertia commented 2 months ago

Hi @gavv can I pick up this issue

gavv commented 2 months ago

Sure, thank you!