Created
April 10, 2013 10:31
-
-
Save warped-rudi/5353524 to your computer and use it in GitHub Desktop.
Fix audio engine's float to S24 conversion
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 -aur --unidirectional-new-file a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp | |
--- a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp 2013-01-28 03:07:32.000000000 +0100 | |
+++ b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp 2013-03-17 13:01:25.000000000 +0100 | |
@@ -837,7 +837,7 @@ | |
_mm_empty(); | |
#else /* no SSE */ | |
for (uint32_t i = 0; i < samples; ++i) | |
- *dst++ = (safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0xFFFFFF) << 8; | |
+ *dst++ = safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0x00FFFFFF; | |
#endif | |
return samples << 2; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment