-
Notifications
You must be signed in to change notification settings - Fork 46
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
Weird ringing in sound #19
Comments
Perhaps XP has crappy audio resampling, sc-55mkII outputs non standard 66207hz audio |
Oh, that makes sense then. |
If I ever get around to writing a VST based on Nuked SC-55, I plan on integrating the Blargg resampler library, which I forked at https://github.com/datajake1999/blargg_resampler. It is a decent resampler that uses sinc interpolation. |
We've been using the Speex resampler (libspeex) in DOSBox Staging with very good results at quality setting 5. That setting is basically transparent on normal musical material for most normal people (except on specially prepared material when A/B-ing it in studio headphones, but even then the difference is extremely hard to spot). It's very fast, even on low-end hardware like the Raspberry Pi 3, so my recommendation. https://speex.org/docs/manual/speex-manual/node7.html#SECTION00760000000000000000 |
I am having similar trouble, but more so. Much more ringing/distortion in Windows 7 x64 official builds. Exactly the same with my Windows XP x86 builds (same on two entirely different systems). Only my Linux x64 build sound good, which kinda proves that the code and ROMs are not borked. I made .wav files with the same 66207Hz and 64000Hz sample rates, which play fine in different sound players. |
You are at mercy of OS/driver's interpolation. On my X86 XP, different results from default audio driver and Virtual Audio Cable. |
Both systems I mentioned use a Realtek audio chipset. I could maybe switch to the AMD graphics HDMI audio for testing. Earlier I looked up details on Windows XP sound resampling, and it suggested that this OS switches to the actual sample rate when the hardware supports it, and when no other sound is playing. |
As me and some others mentioned, the answer is a built-in resampler. SpeexDSP is great, fast, and easy to use. It is the resampler that PulseAudio uses on Linux, from memory. Btw, my Realtek driver on Win10 deals with the unorthodox rate just fine, no issues. |
It would be interesting to test with an embedded resampler. Though I also have some evidence it is actually something else:
But because I am seemingly one of the very few with this problem, I suppose I have to be investigate myself or be patient. |
I've tried shoving in a resampler but I can't seem to not mess up the thin balance between the audio thread and the work thread. |
Haven't looked at the code, but most likely the way the threading is done is not great to begin with, then the extra overhead from the resampler might push it over the limit. Make sure to use an efficient resampler. We use Speex all over the place in DOSBox Staging and there's threading involved etc. In our case, there's a render thread that gets MIDI messages and fills the buffer at whatever native rates, then the mixer and resampler is in another thread. That's what you want; don't overload the rendering thread even more. |
I am finally listening to some reasonably good audio output. This made the difference: |
I do not have an actual SC55 to confirm this, but there is a strange high pitched ringing in the sound, as if interpolation is borked.
I've attached two files in this zip. The one with _hp suffix is filtered in audio editor to isolate the perceived flaw.
The other one is plain recording.
ringadingadingdong.zip
Platform is xp sp3 x86.
The text was updated successfully, but these errors were encountered: