-
Notifications
You must be signed in to change notification settings - Fork 133
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
shortcomings in audsrv and upsampling #528
Comments
nice, I also noticed something similar, do you know the solution? |
If I had one I would've made a PR ;-) Most of it should be easy to fix, but it potentially breaks stuff relying on those bugs. I guess it's up to the maintainer (if there is one at all). As for the bugs:
|
The upsamplers used to upsample to 48 KHz are also flawed:
|
That upsampling stuff really bothers me. I don't think using lookup tables is a good solution to handle this. I had a similar problem with resampling the 44.1 KHz CD audio tracks to the target sample rate. I'd suggest whoever is going to address this might want to look up my solution in the function mix_16h_to_32_resample_stereo in pico/sound/mix.c. It's also relatively independent of the source and target sample rates, so the restriction to certain rates might potentially also be lifted. |
While working on PicoDrive I found the audsrv implementation a bit lacking:
If the audsrv backend on IOP runs low on samples it will replay the buffer over and over, right down to telling you about the buffer being miraculously filled again. New samples then don't have space in it, and the reverberating audio you get remembers me of old GSM mobiles in bad reception conditions.
It simply can't discern "ringbuffer full" from "ringbuffer empty"... so it wraps around and around.
it sets the ringbuffer to half full on set_format without clearing it. Hence, there's always some old audio from the buffer played out first.
stopping will keep all unplayed samples and there is no way to clear the audio ringbuffer.
The text was updated successfully, but these errors were encountered: