Opened 20 years ago
Closed 20 years ago
Last modified 5 years ago
#8259 closed patch
INDY3EGA Amiga - experimental support for sound effects
|Reported by:||SF/quietust||Owned by:||Kirben|
|Cc:||Game:||Indiana Jones 3|
With a bit of experimentation, I was able to add fairly rudimentary support for sound effects in the Amiga version of Indy3.
It currently doesn't handle the following: 1. Multiple sound effects playing simultaneously 2. Looped sound effects (putting the sticky tape in the solvent, draining the water out of the pool, machine noise from lowering the bridge, etc.) currently only play once. 3. Playing sounds at their intended frequencies - 11000Hz seems to sound good for most of them, but some play too slowly.
The sound data given in Sound::playSound (getResourceAddress(...)) has a 28-byte header on it consisting mostly of big endian WORDs. I've attached the headers for a bunch of sound effects as well as a few music clips.
Ticket imported from: #771355. Ticket imported from: patches/364.
Change History (9)
by , 20 years ago
by , 20 years ago
Header data for various Indy3Amiga songs and sound effects
comment:1 by , 20 years ago
The patch also works with Amiga version of Loom, although it doesn't seem to have many sound effects (Notes are music). So gameid check can be changed to version == 3
comment:2 by , 20 years ago
Heh, neat. :D
Just noticed something else: in most of the SFX headers the length field (ptr+12) is repeated, except for looped sound effects where the 2nd number (ptr+14) is smaller - this is probably the duration which gets looped (most likely at the end).
comment:3 by , 20 years ago
I noticed sound effects mixing seems to work as well as PC version of indy3ega. Patch has been added to ScummVM with comments.
comment:4 by , 20 years ago
|Status:||new → closed|
comment:5 by , 20 years ago
The current patch might not be 100% 'stable', as it plays the raw audio directly from the resource rather than allocating a copy (like all of the other raw playback calls do); it probably wouldn't hurt to add SoundMixer::FLAG_AUTOFREE to the flags being set and change the playRaw call to the following, just to be consistent:
sound = (char *)malloc(size); memcpy(sound,ptr + 28,size); _scumm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
comment:6 by , 20 years ago
I just added those changes to ScummVM cvs.
comment:7 by , 5 years ago
|Component:||→ Engine: SCUMM|
|Game:||→ Indiana Jones 3|
Code patch to support Amiga indy3 sound effects