Created
November 4, 2013 15:04
-
-
Save Bigpet/7303834 to your computer and use it in GitHub Desktop.
diff file for DirectSound default behavior change.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Windows/DSoundStream.cpp b/Windows/DSoundStream.cpp | |
index 3e09432..575aeb8 100644 | |
--- a/Windows/DSoundStream.cpp | |
+++ b/Windows/DSoundStream.cpp | |
@@ -135,11 +135,10 @@ namespace DSound | |
{ | |
int numBytesRendered = 4 * (*callback)(realtimeBuffer, numBytesToRender >> 2, 16, 44100, 2); | |
- if (numBytesRendered != 0) | |
- writeDataToBuffer(lastPos, (char *)realtimeBuffer, numBytesRendered); | |
+ writeDataToBuffer(lastPos, (char *)realtimeBuffer, numBytesToRender); | |
- currentPos = ModBufferSize(lastPos + numBytesRendered); | |
- totalRenderedBytes += numBytesRendered; | |
+ currentPos = ModBufferSize(lastPos + numBytesToRender); | |
+ totalRenderedBytes += numBytesToRender; | |
lastPos = currentPos; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment