Reduce VoiceNext's CPU usage with SpinWait
Created by: WamWooWam
Summary
This PR reduces the overall CPU usage of VoiceNext while receiving audio.
Details
Uses System.Threading.SpinWait
to reduce the overall CPU usage of VNext's receive code by spinning the CPU when there's no data to process. In my brief testing, this cuts CPU usage to basically zero, while not sacrificing performance.
Changes proposed
- I mean I pretty much have already...
Notes
This may warrant a bit more testing, for me it works perfectly, but others may wanna try this out before any decisions are made.