-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please clarify use as ASRC #1
Comments
First, let me apologize for not having any function-level documentation on the resampler; I really must rectify that! Especially for implementing an For an ASRC, the only parameter that would be controlled in the servo loop is the The The crudest design I can imagine for an ASRC is where you have one large ring buffer that receives the resampled data (to head) and outputs to the destination (from tail). In that case the buffer level directly controls the ratio: as the buffer level drops the ratio is increased, which causes the resampled data to flow into the buffer faster. The buffer could also hold audio before it's resampled too, either way is pretty much equivalent. Of course, this simple case is complicated by the fact that the data might be arriving (and leaving) in chunks, so unless the buffer is many times the size of the chunks (which means high latency) then it becomes more complex to gauge the “fullness” unless there is timestamp information along with the chunks. In other words, by knowing when the last chunks arrived and left, it's possible to create a much more accurate estimate for the actual fullness. In the most exacting case where precise sample timestamping is available, then it is possible to make very small adjustments to the ratio and correct for the difference in a single small buffer (i.e., a “tight” servo). However, for this to work well it is desireable to get subsample position information from the resampler, and that’s what the I have found that ASRC applications can vary quite a lot with respect to their requirements and implementations, so it’s difficult to answer too specifically. But I hope this helps you get a feeling for how this library might be used. If something is not clear or you need more guidance, please feel free to ask. |
Thank you this helps really a lot! |
Great! I have just added function-level documentation as promised. |
Hey,
thank you for your work!
Could you please explain how to use your library as ASRC (asynchronous sample rate converter) .
Imagine I have two threads, one is pushing new samples in, the other receives them at non synchronous clocks.
Your library would be in the middle.
Which functions would I call?
Which parameters would be static and which should be varied in the servo loop? I would imagine ratio, but what about numInputFrames and numOutputFrames?
Thank you!
The text was updated successfully, but these errors were encountered: