[QUOTE=wareya;44919]Just to note, this is expected when using “sync audio” on audio backends that take large chunks of audio at a time, which is most of them because everything is horrible.
On linux with OSS I’m capable of pushing the hardware audio buffer size to 256, which close enough to an integral dividend of 800 (=1/60th of a second at 48000hz) that it doesn’t act so erratically, but that’s a pretty unstable OS environment (oss on linux is a fourth-class citizen). On windows your best bet is normally the WASAPI backend, but on most machines the chunks that WASAPI shared mode takes out are ~10ms in size, so you’re still going to get noticable stutter even though the chunks are smaller than 1/60th of a second. This is one of the drawbacks of higan’s audio output chain being too simple.
It should be possible to make audio sync work better for input latency on audio backends that take more than 1/60th of a second at a time, but there’ll still be microstutter.[/QUOTE]
Thanks for this explanation, wareya.
[QUOTE=e-tank;45019]as stated in the op he’s using a retrolink usb controller. this is a basic usb hid device, not something you typically have to worry about. the controllers i’d be suspicious of would be ones that require specialized drivers or especially those cheapo console to usb adaptors. the latter are notorious for additional input lag.
also, before ppl bring up usb polling rates keep in mind that the 8ms default usb polling rate != 8ms of additional latency, that just means that your os only polls the controller for input every 8ms. so just ball parking it that’s more like ~4ms of additional latency on the avg (+ ~8ms worst case for just missing an input change, + ~0ms if just caught it). but compared to everything else this is kind of an insignificant factor.
according to the lead libretro/retroarch devs the video display stack (os wm / compositor, video drivers, etc) are responsible for nearly all additional latency on pc hardware. if the various software involved didn’t excessively buffer cmds and frames and gave us a universal way to control how/when the hardware draws and pushes frames to the display, then even with vsync & double buffering we’d be able to emulate a 2d raster based system with only ~1 frame of additional latency (that is step emu (guest vblank first, then active) to generate a frame, tell the gfx card to draw said frame immediately into the back buffer, then wait for vsync and flip front/back buffers). vulkan may very well allow us to have such control, but from what i understand at this point the drivers are still very much a wip.[/QUOTE]
Yep, while I don’t like to make assumptions, I wouldn’t expect this particular controller to add any significant delay in itself. I have been asked to look into the effect of de-bouncing circuitry in the controller and while that would be interesting, I don’t really plan on going into such depth. Besides, with my test configuration, there really isn’t much of the input lag that we can’t already account for given the known quantities. Please see this post where I made a summary:
http://libretro.com/forums/showthread.php?t=5428&p=41748&viewfull=1#post41748
OpenGL on this Radon R9 390 with the 16.5.2.1 drivers really seems to have a minimal amount of buffering. It seems to start scanning out the framebuffer immediately or almost immediately after swapping buffers, which means that there’s hardly any room for improvement. That said, my recent tests of the latest 16.7.3 driver shows how volatile the situation is. That new driver added rather siginficantly to the input lag, for no apparent reason.
Good to hear!