From 46551fd4b53fc8bf4bbdd3a59aeed56f6f9b53e5 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Fri, 18 Mar 2016 22:55:56 -0500 Subject: SCI32: Rewrite digital audio engine This provides a complete implementation of kDoAudio through SCI2.1mid, plus partial implementation of SCI3 features. Digital audio calls shunted through kDoSound have also been updated to go through the SCI32 audio mixer, though these shunts are a bit hacky because the ScummVM implementation of kDoSound does not currently match how SSCI kDoSound is designed. It is probably possible in the future to just replace the SCI1.1 audio code (audio.cpp) with the new SCI32 code, since the major differences seem to be that (1) SCI1.1 only supported one digital audio playback channel (this is configurable already), (2) it had extra commands for CD audio playback and queued sample playback. --- engines/sci/sound/audio.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'engines/sci/sound/audio.cpp') diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp index 71b081049e..4fb9a58003 100644 --- a/engines/sci/sound/audio.cpp +++ b/engines/sci/sound/audio.cpp @@ -253,13 +253,7 @@ static void deDPCM16(byte *soundBuf, Common::SeekableReadStream &audioStream, ui static void deDPCM8Nibble(byte *soundBuf, int32 &s, byte b) { if (b & 8) { -#ifdef ENABLE_SCI32 - // SCI2.1 reverses the order of the table values here - if (getSciVersion() >= SCI_VERSION_2_1_EARLY) - s -= tableDPCM8[b & 7]; - else -#endif - s -= tableDPCM8[7 - (b & 7)]; + s -= tableDPCM8[7 - (b & 7)]; } else s += tableDPCM8[b & 7]; s = CLIP(s, 0, 255); -- cgit v1.2.3