diff options
author | Lionel Ulmer | 2002-04-15 20:22:47 +0000 |
---|---|---|
committer | Lionel Ulmer | 2002-04-15 20:22:47 +0000 |
commit | dabc6a24e8e9de6c952d40ca1daa1c01b897a00d (patch) | |
tree | 95677f65ca665610464667fe0157fe3afb50fe88 | |
parent | 1bd43901174f4f061a3ccc05f5c362114492a664 (diff) | |
download | scummvm-rg350-dabc6a24e8e9de6c952d40ca1daa1c01b897a00d.tar.gz scummvm-rg350-dabc6a24e8e9de6c952d40ca1daa1c01b897a00d.tar.bz2 scummvm-rg350-dabc6a24e8e9de6c952d40ca1daa1c01b897a00d.zip |
Fixed the MP3 support for .SOU files. I will let Arisme fix his MP3 audio track support :-)
svn-id: r3949
-rwxr-xr-x | mp3_cd.cpp | 2 | ||||
-rw-r--r-- | scumm.h | 4 | ||||
-rw-r--r-- | sound.cpp | 14 |
3 files changed, 8 insertions, 12 deletions
diff --git a/mp3_cd.cpp b/mp3_cd.cpp index a70c1792f1..82d54d30b7 100755 --- a/mp3_cd.cpp +++ b/mp3_cd.cpp @@ -21,7 +21,7 @@ #include "stdafx.h" #include "scumm.h" -#ifdef COMPRESSED_SOUND_FILE +#ifdef COMPRESSED_SOUND_FILE__ #include "mp3_cd.h" #include <SDL.h> @@ -23,10 +23,6 @@ #include "system.h" #include "mixer.h" -#ifdef COMPRESSED_SOUND_FILE -#include <mad.h> -#endif - #define SCUMMVM_VERSION "0.2.0 devel" #define SCUMMVM_CVS "031402" @@ -187,10 +187,8 @@ void Scumm::startTalkSound(uint32 offset, uint32 b, int mode) MP3OffsetTable *result = NULL, key; key.org_offset = offset; - result = - (MP3OffsetTable *) bsearch(&key, offset_table, num_sound_effects, - sizeof(MP3OffsetTable), compar); - + result = (MP3OffsetTable *) bsearch(&key, offset_table, num_sound_effects, + sizeof(MP3OffsetTable), compar); if (result == NULL) { warning("startTalkSound: did not find sound at offset %d !", offset); @@ -545,7 +543,7 @@ void *Scumm::openSfxFile() cur = offset_table; while (size > 0) { cur[0].org_offset = get_int(file); - cur[0].new_offset = get_int(file) + compressed_offset + 4; /* The + 4 is to take into accound the 'size' field */ + cur[0].new_offset = get_int(file) + compressed_offset + 4; /* The + 4 is to take into accound the 'size' field */ cur[0].num_tags = get_int(file); cur[0].compressed_size = get_int(file); size -= 4 * 4; @@ -584,5 +582,7 @@ void Scumm::playSfxSound(void *sound, uint32 size, uint rate) _mixer->play_raw(NULL, sound, size, rate, SoundMixer::FLAG_AUTOFREE); } - - +void Scumm::playSfxSound_MP3(void *sound, uint32 size) +{ + _mixer->play_mp3(NULL, sound, size, SoundMixer::FLAG_AUTOFREE); +} |