[Scummvm-git-logs] scummvm master -> 92c5f36388a2f4a9b2a7087acfae5df2e019dd0c
digitall
noreply at scummvm.org
Mon Mar 21 22:04:35 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
92c5f36388 ULTIMA: NUVIE: Remove Usage of Undefined SDL Byte Order Symbols
Commit: 92c5f36388a2f4a9b2a7087acfae5df2e019dd0c
https://github.com/scummvm/scummvm/commit/92c5f36388a2f4a9b2a7087acfae5df2e019dd0c
Author: D G Turner (digitall at scummvm.org)
Date: 2022-03-21T22:00:37Z
Commit Message:
ULTIMA: NUVIE: Remove Usage of Undefined SDL Byte Order Symbols
This code was originally intended to support Big Endian audio using
libSDL. However, since the missing symbols defaulted to 0 in both cases,
this code was active in all cases which is very wrong for Little Endian
platforms. This should be reviewed and fixed for both BE and LE targets
with testing.
This generated GCC undefined macro compiler warnings when -Wundef was
passed.
Changed paths:
engines/ultima/nuvie/core/converse_speech.cpp
diff --git a/engines/ultima/nuvie/core/converse_speech.cpp b/engines/ultima/nuvie/core/converse_speech.cpp
index c22878e0cbc..8464ce57c31 100644
--- a/engines/ultima/nuvie/core/converse_speech.cpp
+++ b/engines/ultima/nuvie/core/converse_speech.cpp
@@ -177,17 +177,17 @@ NuvieIOBuffer *ConverseSpeech::load_speech(Std::string filename, uint16 sample_n
inline sint16 ConverseSpeech::convert_sample(uint16 raw_sample) {
sint16 sample;
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
- sint16 temp_sample;
-#endif
if (raw_sample & 128)
sample = ((sint16)(abs(128 - raw_sample) * 256) ^ 0xffff) + 1;
else
sample = raw_sample * 256;
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
- temp_sample = sample >> 8;
+// FIXME: Following code is for Big Endian sample conversion
+// This was required for older libSDL audio output.
+// May not be needed for ScummVM audio output?
+#if 0
+ sint16 temp_sample = sample >> 8;
temp_sample |= (sample & 0xff) << 8;
sample = temp_sample;
#endif
More information about the Scummvm-git-logs
mailing list