tl;dr - Outside of stand-alone music playback, N64 audio sampling rates are a pain
Most of the sound and music the N64 outputted ran at things like 32006Hz and/or 22047Hz. AFAIK no PC sound card in existence can handle those sampling rates directly, and since Cen64 is cycle-accurate we cannot just slightly slow down and speed up these sampling rates to 32KHz and/or 22.05KHz like can be done to achieve high-quality music playback of stand-alone N64 audio. Therefore resampling must be done at some point.
The question is, where in the audio pipeline should this be done?
Considering the funky sampling rates, it would be useful to have as much sampling head-room as possible - 32006Hz would come out cleaner resampled to 192KHz than it would to 48KHz. An analogy would be that you'd get a considerably cleaner result if you upscaled a 324x243 image to 1920x1440 rather than if you upscaled it to 480x360.
However, at least in the Windows world, if you aren't using ASIO or WASAPI, then your audio is going to be resampled anyway to whatever the sampling rate is set to for the output audio device's "Default format" which happens to default to 44.1KHz 16bit.
One way is to not do any resampling in Cen64 at all and just let the OS handle it. But if quality preservation of sound is key, then this would fly face into that; like I mentioned, at least in the Windows world, it defaults to 44.1KHz which wouldn't be the greatest for 32006Hz audio. However this method would provide the best compatibility, and arguably good quality for anyone willing to manually set via the Windows control panel to resample to something higher.
The alternative, again at least in the Windows world, you could avoid the OS's resampler by using ASIO or WASAPI, but then if the sound card in question doesn't support 192KHz then the audio wouldn't play. And then ASIO isn't even open source and therefore wouldn't even be able to be included with Cen64, and that's the only way to by-pass OS resampling with Creative and Asus sound cards without manually setting via the Windows control panel the desired sampling rate.
One could argue for a compromise solution with WASAPI + 96KHz, since even integrated sound cards that are 8 years old support that sampling rate. However, if there are more than a couple HDTV's like mine where only up to 48KHz is supported over HDMI input, then a person plugging their PC into an HDTV directly will be out of luck (outside of the above-mentioned Creative/Asus resampling).
...or maybe I'm just over-thinking this entire thing?
(Sort-of off-topic: you know what would be cool in the future? A foobar2000 plugin based on Cen64's currently non-existent sound core)
Discuss topics related to development here.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests