duncanthrax / scream

Virtual network sound card for Microsoft Windows
Microsoft Public License
1.74k stars 147 forks source link

poll shmem according to target latency #186

Closed arcnmx closed 2 years ago

arcnmx commented 2 years ago

seems nicer than the hard-coded 10ms, also consider 1000 / 5 for parity with current defaults?

martinellimarco commented 2 years ago

Seems good to me. I don't think 1000 / 8 instead of 1000 / 5 is going to be a problem but as you noted with 1000 / 5 we get the current default. Out of curiosity, is there a reason why you chose 1000 / 8?

arcnmx commented 2 years ago

I'm not sure there was a real reason, 1/5th just may have felt a bit high? At the time I was trying to reduce latency and jitter, and had also adjusted the catch-up cutoff, but I don't recall now how much of it was actually necessary or measurable change. I typically would run it around -t 8 fwiw.

martinellimarco commented 2 years ago

I tested it for a couple of days and everything seems fine. About the catch-up cutoff fix, I tested with 2 at the beginning but it was causing xruns on some systems while 3 solved that.