Opened 16 years ago

Closed 16 years ago

Last modified 13 months ago

#8259 closed patch

INDY3EGA Amiga - experimental support for sound effects

Reported by: SF/quietust Owned by: Kirben
Priority: normal Component: Engine: SCUMM
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)

indy3amisound.diff (1008 bytes ) - added by SF/quietust 16 years ago.
Code patch to support Amiga indy3 sound effects
indy3sound.txt (4.0 KB ) - added by SF/quietust 16 years ago.
Header data for various Indy3Amiga songs and sound effects

Download all attachments as: .zip

Change History (9)

by SF/quietust, 16 years ago

Attachment: indy3amisound.diff added

Code patch to support Amiga indy3 sound effects

by SF/quietust, 16 years ago

Attachment: indy3sound.txt added

Header data for various Indy3Amiga songs and sound effects

comment:1 by Kirben, 16 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 SF/quietust, 16 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 Kirben, 16 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 Kirben, 16 years ago

Owner: set to Kirben
Status: newclosed

comment:5 by SF/quietust, 16 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 Kirben, 16 years ago

I just added those changes to ScummVM cvs.

comment:7 by digitall, 13 months ago

Component: Engine: SCUMM
Game: Indiana Jones 3
Note: See TracTickets for help on using tickets.