[Scummvm-cvs-logs] scummvm-tools master -> fe8447381a88f407e4d23c39e1bdf9650e792527
eriktorbjorn
eriktorbjorn at telia.com
Sat Feb 23 23:48:50 CET 2013
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .
Summary:
49179fb903 TOOLS: Add MP3/OGG/FLAC signature to compressed Tinsel .smk files
fe8447381a TOOLS: Remove obsolete/misleading comment
Commit: 49179fb9038ba848f9158e99e33114f8a2d014d5
https://github.com/scummvm/scummvm-tools/commit/49179fb9038ba848f9158e99e33114f8a2d014d5
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-02-23T14:45:40-08:00
Commit Message:
TOOLS: Add MP3/OGG/FLAC signature to compressed Tinsel .smk files
Other than matching the signature in the .idx file, this ensures
that no sound begins at offset 0. This is good because offset 0
signifies that there is no sound. This caused the first line of
speech as Rincewind wakes up at the beginning of Discworld 1 to
only be writte, not spoken. This should not break backwards
compatibility in any way.
Changed paths:
NEWS
engines/tinsel/compress_tinsel.cpp
diff --git a/NEWS b/NEWS
index 13fbaa6..c7becdb 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,10 @@ For a more comprehensive changelog of the latest experimental code, see:
files needed to be all uppercase).
- Improve tool detection and inputs handling for tools that require multiple
input files or an input directory (in both the GUI and command line).
+ - Add signature to compressed Tinsel .smp to match the one at the start of
+ the .idx file. This ensures that no sound starts at offset 0, since that is
+ interpreted as the sound missing. This fixes the first line of speech when
+ Rincewind wakes up at the beginning of Discworld 1.
1.4.0 (2011-11-11)
- Updated the compress_sci tool to add support for compressing the AUDIO001.002
diff --git a/engines/tinsel/compress_tinsel.cpp b/engines/tinsel/compress_tinsel.cpp
index f9ae084..99d91a3 100644
--- a/engines/tinsel/compress_tinsel.cpp
+++ b/engines/tinsel/compress_tinsel.cpp
@@ -274,6 +274,20 @@ void CompressTinsel::execute() {
Common::removeFile(TEMP_SMP);
_output_smp.open(TEMP_SMP, "wb");
+ switch (_format) {
+ case AUDIO_MP3:
+ _output_smp.writeUint32BE(MKID_BE('MP3 '));
+ break;
+ case AUDIO_VORBIS:
+ _output_smp.writeUint32BE(MKID_BE('OGG '));
+ break;
+ case AUDIO_FLAC:
+ _output_idx.writeUint32BE(MKID_BE('FLAC'));
+ break;
+ default:
+ throw ToolException("Unknown audio format!");
+ }
+
_input_idx.seek(0, SEEK_END);
indexCount = _input_idx.pos() / sizeof(uint32);
_input_idx.seek(0, SEEK_SET);
Commit: fe8447381a88f407e4d23c39e1bdf9650e792527
https://github.com/scummvm/scummvm-tools/commit/fe8447381a88f407e4d23c39e1bdf9650e792527
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-02-23T14:46:35-08:00
Commit Message:
TOOLS: Remove obsolete/misleading comment
Apparently the detector is smart enough to not have to look ad the
.smp file to identify the games.
Changed paths:
engines/tinsel/compress_tinsel.cpp
diff --git a/engines/tinsel/compress_tinsel.cpp b/engines/tinsel/compress_tinsel.cpp
index 99d91a3..2e0d821 100644
--- a/engines/tinsel/compress_tinsel.cpp
+++ b/engines/tinsel/compress_tinsel.cpp
@@ -42,8 +42,6 @@
// raw-data as samples and DiscWorld 2 uses ADPCM 6-bit encoded data as samples. We suppose that we will need to do ADPCM
// decoding on all multi-sample data.
-// We also copy over the first 5000 bytes of the .smp file, because otherwise we would trash ScummVM detection.
-
#define TEMP_IDX "compressed.idx"
#define TEMP_SMP "compressed.smp"
#define TEMP_RAW "tempfile.raw"
More information about the Scummvm-git-logs
mailing list