From 05500ac6b1ee44813104f51c8e3b617d92e8707d Mon Sep 17 00:00:00 2001 From: goyuken Date: Tue, 2 Oct 2012 22:05:07 +0000 Subject: [PATCH] more efficient sleeping in sound throttle system --- BizHawk.MultiClient/Sound.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/Sound.cs b/BizHawk.MultiClient/Sound.cs index b14fa33356..bb3e6c0313 100644 --- a/BizHawk.MultiClient/Sound.cs +++ b/BizHawk.MultiClient/Sound.cs @@ -139,7 +139,7 @@ namespace BizHawk.MultiClient while (samplesNeeded < samplesWanted) { - System.Threading.Thread.Yield(); // TODO: much better sleeping + System.Threading.Thread.Sleep((samplesWanted - samplesNeeded) / 88); // let audio clock control sleep time samplesNeeded = SNDDXGetAudioSpace() * 2; } samplesNeeded = samplesWanted;