mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 20:17:49 +00:00
Fixed the bug that caused Vorbis and FLAC to misbehave with compressed
speech. (Apparently it was just an accident that MP3 worked.) Unfortunately I had to change the file format of the compressed files to include both the compressed and uncompressed size, but since the tool to create these files has only lived as an item in the patch tracker, no one should have exptected it to be the final, working version, right? Right. svn-id: r14698
This commit is contained in:
parent
e46c81ad74
commit
44eca16eb6
1
NEWS
1
NEWS
@ -32,6 +32,7 @@ For a more comprehensive changelog for the latest experimental CVS code, see:
|
||||
Sword2:
|
||||
- Simplified memory/resource management
|
||||
- Simplified sound effects handling
|
||||
- Support for compressed speech.
|
||||
- Various minor bugfixes.
|
||||
|
||||
0.6.1b (2004-08-03)
|
||||
|
@ -804,10 +804,17 @@ uint32 Sound::preFetchCompSpeech(uint32 speechid, uint16 **buf) {
|
||||
if (!soundMode)
|
||||
return 0;
|
||||
|
||||
fp.seek((speechid + 1) * 8, SEEK_SET);
|
||||
if (soundMode == kWAVMode)
|
||||
fp.seek((speechid + 1) * 8, SEEK_SET);
|
||||
else
|
||||
fp.seek((speechid + 1) * 12, SEEK_SET);
|
||||
|
||||
uint32 speechPos = fp.readUint32LE();
|
||||
uint32 speechLength = fp.readUint32LE();
|
||||
uint32 encLength = 0;
|
||||
|
||||
if (soundMode != kWAVMode)
|
||||
encLength = fp.readUint32LE();
|
||||
|
||||
if (!speechPos || !speechLength) {
|
||||
fp.close();
|
||||
@ -819,17 +826,17 @@ uint32 Sound::preFetchCompSpeech(uint32 speechid, uint16 **buf) {
|
||||
switch (soundMode) {
|
||||
#ifdef USE_MAD
|
||||
case kMP3Mode:
|
||||
input = makeMP3Stream(&fp, speechLength);
|
||||
input = makeMP3Stream(&fp, encLength);
|
||||
break;
|
||||
#endif
|
||||
#ifdef USE_VORBIS
|
||||
case kVorbisMode:
|
||||
input = makeVorbisStream(&fp, speechLength);
|
||||
input = makeVorbisStream(&fp, encLength);
|
||||
break;
|
||||
#endif
|
||||
#ifdef USE_FLAC
|
||||
case kFlacMode:
|
||||
input = makeFlacStream(&fp, speechLength);
|
||||
input = makeFlacStream(&fp, encLength);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user