As one probably knows, a whole slew of GameCube and Wii games internally render their audio at 32000Hz, though there are some other games that use rates less than that (if Dolphin is to be believed than F-Zero GX uses a weird sub-32Khz sampling rate that I don't remember the value of off the top of my head).
From there it's my impression that, on real hardware, all audio is resampled to 48kHz for the final audio output.
Now 48kHz is a common enough sampling rate on PCs but, even then, you can still run into cases where it's not the default. Furthermore, what about when running WASAPI exclusive on Windows which ignores the default and instead just chooses the rate that is an identical match? (except on Sound Blaster and Asus sound cards which basically ignore exclusive mode)
So basically the way I see things is that there are two possibilities on how Dolphin currently handles audio resampling, but I do not know which manner is the way that it behaves; for this example we're running a 32kHz game with OS is set to 192kHz:
Furthermore, there's always the possibility that Dolphin behaves differently when dealing with a final output that is less than 48kHz, e.g. if the OS is set to 44.1kHz instead. I don't suppose devs have insight into this as well, or if it behaves the same regardless of the final output sampling rate?
Even more-so, there's even the possibility that PulseAudio on Linux can further behave differently because it's my impression that, if you're using PipeWire in-place of PulseAudio, then it can actually be configured to automatically change the output sampling rate to whatever is the best-fit (presumably when only a single audio stream is playing at least - I say "presumably" because I've not gotten the function to work on my current Mint 20.3 config) in a manner similar to WASAPI exclusive (but without the "exclusive" - I don't suppose this is how WASAPI non-exclusive works?)
From there it's my impression that, on real hardware, all audio is resampled to 48kHz for the final audio output.
Now 48kHz is a common enough sampling rate on PCs but, even then, you can still run into cases where it's not the default. Furthermore, what about when running WASAPI exclusive on Windows which ignores the default and instead just chooses the rate that is an identical match? (except on Sound Blaster and Asus sound cards which basically ignore exclusive mode)
So basically the way I see things is that there are two possibilities on how Dolphin currently handles audio resampling, but I do not know which manner is the way that it behaves; for this example we're running a 32kHz game with OS is set to 192kHz:
- 32kHz --to-> 192kHz
- 32kHz --to-> 48kHz --to-> 192kHz
Furthermore, there's always the possibility that Dolphin behaves differently when dealing with a final output that is less than 48kHz, e.g. if the OS is set to 44.1kHz instead. I don't suppose devs have insight into this as well, or if it behaves the same regardless of the final output sampling rate?
Even more-so, there's even the possibility that PulseAudio on Linux can further behave differently because it's my impression that, if you're using PipeWire in-place of PulseAudio, then it can actually be configured to automatically change the output sampling rate to whatever is the best-fit (presumably when only a single audio stream is playing at least - I say "presumably" because I've not gotten the function to work on my current Mint 20.3 config) in a manner similar to WASAPI exclusive (but without the "exclusive" - I don't suppose this is how WASAPI non-exclusive works?)
Dolphin 5.0 CPU benchmark
CPU: Xeon E3-1246 v3 (4c/8t Haswell/Intel 4th gen) — core & cache @ 3.9GHz via multicore enhancement
GPU: Intel integrated HD Graphics P4600
RAM: 4x8GB Corsair Vengence @ DDR3-1600
OS: Linux Mint 20.3 Xfce + [VM] Win7 SP1 x64
CPU: Xeon E3-1246 v3 (4c/8t Haswell/Intel 4th gen) — core & cache @ 3.9GHz via multicore enhancement
GPU: Intel integrated HD Graphics P4600
RAM: 4x8GB Corsair Vengence @ DDR3-1600
OS: Linux Mint 20.3 Xfce + [VM] Win7 SP1 x64