DerKoun / bsnes-hd

bsnes fork that adds HD video features
GNU General Public License v3.0
632 stars 36 forks source link

Lower default sound latency #58

Closed wojpawlik closed 3 years ago

wojpawlik commented 4 years ago

bsnes-hd defaults audio latency to 512, which delays jump sound effect in SMW until Mario is already at full height.

Upstream bsnes_v115-windows also internally defaults to 512, but ships with a config file lowering it to 128.

Unscientific tests on my machine (Windows 2004, bsnes-hd 10.3, Super Mario World, default settings: audio sync, no dynamic rate, no exclusive mode):

Driver No sound artifacts in game No sound artifacts when toggling fullscreen
WASAPI ≥ 0 ≥ 100
XAudio 2.1 ≥ 20 ≥ 80
Direct Sound 7.0 ≥ 40 unachievable
waveOut (default) ≥ 40 ≥ 160

That said, for actually playing on my system, I'd probably use the Dynamic Rate Control preset.

DerKoun commented 3 years ago

I try to avoid shipping a default config file, especially one differing from the defaults in the code. I'll look into it, but considering it's not HD functionality, I'm not sure if I want to make changes that might be more dangerous than I expected.

wojpawlik commented 3 years ago

I'm only advocating for changing the default waveOut latency in the code to 160 or 128 (same as bsnes), to improve first impression. I'm not advocating here for shipping default config file, nor changing the default driver.

wojpawlik commented 3 years ago

Even though on my system WASAPI allows the lowest latency with audio sync, and somehow produces the least artifacts without.

DerKoun commented 3 years ago

Changed in new beta 10.4