#8259 closed patch
INDY3EGA Amiga - experimental support for sound effects
Reported by: | SF/quietust | Owned by: | Kirben |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Indiana Jones 3 |
Description
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.
Attachments (2)
Change History (9)
by , 21 years ago
Attachment: | indy3amisound.diff added |
---|
by , 21 years ago
Attachment: | indy3sound.txt added |
---|
Header data for various Indy3Amiga songs and sound effects
comment:1 by , 21 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 , 21 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 , 21 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 , 21 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:5 by , 21 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:7 by , 6 years ago
Component: | → Engine: SCUMM |
---|---|
Game: | → Indiana Jones 3 |
Code patch to support Amiga indy3 sound effects