Thanks for your great Mesen core
There is one minor issue which I hope you could look into.
The Wasapi audio driver in Retroarch is able to get very low audio latency, but unfortunately when using the Wasapi audio driver with Mesen there are tiny glitches every now and then.
I have no issues when using the XAudio driver on the other hand, it works perfect with Mesen, but since the Wasapi driver should be capable of much lower latency audio and also with less cpu load (it’s event driven), I was rather eager to try it with the Mesen core.
It’s a known issue that the Retroarch Wasapi driver is not compatible with all cores. It can be read here in the development thread:
For example the Mednafen PCE fast core works perfect with the Wasapi driver, giving audio latency as low as 10ms without issues. On the other hand when using the Wasapi driver with for example the bsnes cores there are glitches/issues. So it’s a kind of hit and miss per core.
In the above mentioned thread Casdevel (who developed the driver) commented on what he thinks is one of the possible causes of these incompatibility issues: https://github.com/libretro/RetroArch/issues/2771#issuecomment-302953437
Most important stat’s are average input chunk lengths and average blocking times. If input data duration is shorter than device period (reported after client initialization) and intermediate buffer is off, there probably will be issues. The same goes for blocking periods that are longer than device period. Unfortunately audio driver can’t influence either of those two things.
I tested bsnes-mercury-balanced core and data chunks are too small (below 100 frames) while device period is 480 frames (in shared-mode on my machine). This is why WASAPI driver have problems with this core.
I’m not sure whether anything can be done on the Mesen libretro core side, but possibly you can look into it?