#4605 closed defect (fixed)
SWORD1: Loss of background audio loop
Reported by: | SF/jerrywoolsey | Owned by: | eriktorbjorn |
---|---|---|---|
Priority: | normal | Component: | Engine: Sword1 |
Version: | Keywords: | ||
Cc: | Game: | Broken Sword 1 |
Description
I've been playing the game with no problems except that on going to Marib I no longer have any of the backgound market sound loop. I have the music playing but that's it. I'll attatch my savegame for you to check out. I didn't see this problem being reported from anyone else.
This is on Vista 32, English CD version.
Ticket imported from: #2857910. Ticket imported from: bugs/4605.
Attachments (2)
Change History (8)
by , 15 years ago
Attachment: | sword1.000 added |
---|
comment:2 by , 15 years ago
It could be a missing feature, but if so it probably affects a lot more than just Marib.
I'm no expert on the Broken Sword 1 engine, but there are three different kinds of sound effects: spot, random and looping. Spot effects are played once, random effects are played randomly until the player leaves the room, and looping effects play continuously until the player leaves the room.
The sound effects are hard-coded in _fxList[] and there is an entry called "153 Marib ambience". It's a looping sound effect, and there's a list of volume settings for three different rooms where it should be played. (I haven't checked exactly what rooms these are.) There's also a list of "fixed sound effects", _roomsFixedFx[], which tells which sound effects are associated with each room.
Currently, there are two ways that I know of that a sound effect can be triggered: A script can ask for a sound effect to be played (probably mainly used for spot effects to go with animations), or it can be triggered as a random sound effect, using _roomsFixedFx[] to figure out which sound effects it should use in the current room. But this is odd, because _roomsFixedFx[] also refers to spot and looping effects.
I don't see much purpose for it to refer to spot effects myself, but it's possible that the game engine, not the scripts, is responsible for starting the room's looping sound effects. I noticed that there is a faint noise of traffic in the very first room when I play it with the original interpreter, but I can't hear it in ScummVM.
I'm going to attach a patch that triggers the looping effects automatically when entering a new room, but I don't know if it's the right thing to do. (It might be easy to figure out, since we got at least parts of the original source code from Revolution, but I don't know where that original code is. It may be that only some developers got access to it, so I'll have to ask around.)
comment:3 by , 15 years ago
I had the opportunity to look at the original code, and I could see that it is indeed the engine that's responsible for starting the looping sounds in the background. The ones I've noticed so far are rather faint, which is probably why the missing feature went unnoticed for all this time.
I've fixed it in the trunk, using a slightly modified version of the patch I attached, but I'll need to play around with the game a lot more before I decide if it can safely be applied to the 1.0 branch as well.
comment:4 by , 15 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 by , 15 years ago
Summary: | Loss of background audio loop → SWORD1: Loss of background audio loop |
---|
comment:6 by , 15 years ago
I've added this fix to the 1.0 branch as well now. I played through the whole game without encountering any problems, and the sound effects it added all made sense to me. (Some were rather hard to make out, though.)
Savegame