30 Sep
2013
30 Sep
'13
4:16 p.m.
Rob Sykes wrote:
Typically there is some buffering/delay within a resampler -- how does the pcm_rate API allow for this?
The API itself does not allow for this. Your code must generate dst_frames samples.
At startup, prefix the output with zero samples.
this situation can apparently occur at any time: "after that first call all subsequent calls will probably get you about 2000 samples out for every 1000 samples you put in" — only "probably", not "always"; occurring after the start, this will likely cause audible distortion.
You must know your resampling algorithm. If it introduces delays, you need to buffer more samples.
Regards, Clemens