ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.comDotEmu  Rules - Search - Register - Login curved edge
Folder Forum Index > Help and Support > The Dig loops a trickling sound after pushing boulder Goto page 1, 2  Next
The Dig loops a trickling sound after pushing boulder
  Author    Thread Reply to topic
kvn8907



Joined: 05 Jan 2012
Posts: 9
The Dig loops a trickling sound after pushing boulder 

First of all, I spent about a half hour trying to get The Dig to work again on DOSbox before I decided to give this program a try. The program worked very well, until I got a persistant error near the middle of the game.

At first I thought the trickling water sound in the game was just a simply fluke when I found it followed my character past the Nest area, but it wouldn't go away. So, I narrowed down the exact trigger.

I'm at the part of the game where Robbins is tangled in a web, and Brink is taunting a monster away from her. I have Lowe go out and go to the top of the waterfall. Now, stepping on the diverting plate gives a 4 second, mostly silent cutscene of Robbins struggling and water trickling out of the grate. But if I push the rock, it automatically jumps to Robbins struggling, with the trickling water sound effect, and when the screen jumps back to Lowe, the tricking water sound persists, and will then persist on every location in the game (even deserts). It's pretty annoying.

Does anyone have any suggestions for solving this issue?


Last edited by kvn8907 on Thu Jan 05, 2012 11:11 pm; edited 2 times in total

 Reply with quote  
Post Thu Jan 05, 2012 9:04 pm 
 View user's profile Send private message
tsoliman
ScummVM Developer


Joined: 19 Jan 2011
Posts: 302
Location: Waukesha, WI
 

Platform?
Version?

 Reply with quote  
Post Thu Jan 05, 2012 9:14 pm 
 View user's profile Send private message Send e-mail
kvn8907



Joined: 05 Jan 2012
Posts: 9
 

SCUMMVM version 1.4

 Reply with quote  
Post Thu Jan 05, 2012 9:38 pm 
 View user's profile Send private message
kvn8907



Joined: 05 Jan 2012
Posts: 9
 

How long does it typically take to get a second reply in a thread like this?

 Reply with quote  
Post Fri Jan 06, 2012 1:28 am 
 View user's profile Send private message
icanntspell



Joined: 18 May 2009
Posts: 74
Location: The Netherlands
 

On which platform are you playing the game? Can you provide a savegame of just before the trigger of the bug? (You might also just want to file a bug report). All the people here are doing this in their free time, don't expect help-desk response times. also the better your post is, the more chance on a helpful response.

 Reply with quote  
Post Fri Jan 06, 2012 7:01 am 
 View user's profile Send private message Visit poster's website
kvn8907



Joined: 05 Jan 2012
Posts: 9
 

The forum won't let me post external links until I've had three posts, so I'm splitting my post into two so it's not identified as spam.

Oh, I'm fine if responses take a full day. I was just worried that this was the kind of forum where after a person posts, no one responds to it after the first hour and it becomes abandoned. Also, I've been home sick for the past few days, and I'm anxious to get this error fixed (a game where it doesn't matter if you take a few seconds to blow your nose is exactly the kind of thing to play while sick. Also, that's why I decided not to play much Call of Duty while sick [sluggish reflexes, and runny nose]).

Anyway, platform was Default, though I decided to try it on Windows and DOS with no effect.

I've tried it on two different computers too.

Savegame in next post.


Last edited by kvn8907 on Fri Jan 06, 2012 5:22 pm; edited 1 time in total

 Reply with quote  
Post Fri Jan 06, 2012 5:14 pm 
 View user's profile Send private message
kvn8907



Joined: 05 Jan 2012
Posts: 9
 

Strange. This forum isn't just notifying me when others post on this thread. It's notifying me whant I post on this thread.

Anyway, here's right before the error:
http://www.megaupload.com/?d=7OQNQG1W
Simply push the rock. The game will cut to Robbins hanging by threads and water trickling, then cut back to you. But at least for me, when it cuts back to Boston, the trickling continues. It's a bit difficult to hear with the rushing water on that screen, but simply move to any other screen and the trickling continues (I find walking to the Beach gives a good indication of whether or not the trickling is looping#.

If you have any difficulty loading the game, tell me and I'll try to fix it.

If you load the game and don't get the looping sound #and you're sure you're not getting it, even after finishing the Robbins rescue and moving to a drier screen), that's probably a good thing, and would mean there's an easy way to solve this problem.

If you load the game and do get the looping sound, that probably means there's a problem with how I'm running the game, or a general problem with SCUMMVM.

I look forward to anyone's response. Smile

 Reply with quote  
Post Fri Jan 06, 2012 5:19 pm 
 View user's profile Send private message
eriktorbjorn
ScummVM Developer


Joined: 31 Oct 2005
Posts: 3149
 

quote:
Originally posted by kvn8907
Strange. This forum isn't just notifying me when others post on this thread. It's notifying me whant I post on this thread.


I guess that's just one of several reasons the bug tracker is better than the forum for bug reports. Wink

As for the bug itself... I don't know. Digital iMUSE is mostly uncharted waters to me. I think the sound you're hearing is one that's started when you enter the lair, if there's water trickling into it. Exiting the room does not explicitly stop that sound, but does - if I understand it right - tell the resource manager that it's free to purge the sound resource if it's running out of space.

I have no idea how to proceed from there. I've asked aquadran, since he's the resident Digital iMUSE guru, but I don't know if he's had the time to look any closer at it. I think he's currently focusing more on Residual... sorry, ResidualVM, at the moment.
 Reply with quote  
Post Sat Jan 07, 2012 7:52 pm 
 View user's profile Send private message
kvn8907



Joined: 05 Jan 2012
Posts: 9
 

Thank you for the response.

quote:
Originally posted by eriktorbjorn
As for the bug itself... I don't know. Digital iMUSE is mostly uncharted waters to me. I think the sound you're hearing is one that's started when you enter the lair, if there's water trickling into it. Exiting the room does not explicitly stop that sound, but does - if I understand it right - tell the resource manager that it's free to purge the sound resource if it's running out of space.


I know much less about sound programming than you do, but that doesn't seem to make much sense, for two reasons. First, entering the lair seems to have little effect on triggering it, as I was able to isolate the exact action required to start the sound looping (Pushing the boulder), and it's it's infinitely reproducible. Everytime I push the boulder, when it cuts back to Lowe, I can hear the trickle sound intermixed with the rushing water sound of the waterfall.

Second, if it's programmed in such a circuitous way, why is it that every other sound effect quits properly when not displaying the scene it's associated with?

Besides that, what I'm really looking for right now is if anyone gets the same error when they load the game from that save. Whether people do or do not will really help determine whether it's an issue with me, the program, or the game files.
 Reply with quote  
Post Sun Jan 08, 2012 5:13 am 
 View user's profile Send private message
tsoliman
ScummVM Developer


Joined: 19 Jan 2011
Posts: 302
Location: Waukesha, WI
 

You seem confident you have a reproducible bug.

Forum rule 3a

 Reply with quote  
Post Sun Jan 08, 2012 5:19 am 
 View user's profile Send private message Send e-mail
eriktorbjorn
ScummVM Developer


Joined: 31 Oct 2005
Posts: 3149
 

quote:
Originally posted by kvn8907
I know much less about sound programming than you do, but that doesn't seem to make much sense, for two reasons. First, entering the lair seems to have little effect on triggering it, as I was able to isolate the exact action required to start the sound looping (Pushing the boulder), and it's it's infinitely reproducible. Everytime I push the boulder, when it cuts back to Lowe, I can hear the trickle sound intermixed with the rushing water sound of the waterfall.


I think that when it shows you a brief glimpse of the lair right after pushing the boulder, that counts as entering/exiting the room. Near the end of that entry script, it does this:

code:

[01F7] (5D) if (getState(357) == 1) {
[0202] (74)   startSound(215)
[0206] (AC)   soundKludge([12,215,1536,40])
[0216] (**) }




I'm guessing that getState(357) indicates whether or not the boulder has been pushed, though I haven't actually verified that. The "soundKludge" line appears to simply set the volume for the sound it just started. That was the only reference I could find to actually doing anything with that particular sound when I walked around the surrounding rooms.

So it could be a bug in the original game script. If I add a quick-and-dirty workaround to tell it to stop that sound when exiting that room, the problem seems to go away. But it could also be a difference in how we handle sounds compared to the original.
 Reply with quote  
Post Sun Jan 08, 2012 8:45 am 
 View user's profile Send private message
eriktorbjorn
ScummVM Developer


Joined: 31 Oct 2005
Posts: 3149
 

Looks like it's a bug in the original game as well. In at least one of my tests, the trickling sound didn't stop until I got back to the nexus.

Which actually makes it simpler, because adding a workaround for the bug should be trivial compared to figuring out obscure cases in Digital iMUSE. Here is an example of what such a workaround could look like, but I don't want to commit it before discussing it with others first:

code:

diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index cfc4b3c..c9e3edd 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -29,6 +29,7 @@
 #include "scumm/resource.h"
 #include "scumm/util.h"
 #include "scumm/scumm_v2.h"
+#include "scumm/sound.h"
 #include "scumm/verbs.h"
 
 namespace Scumm {
@@ -935,6 +936,17 @@ void ScummEngine::runExitScript() {
    }
    if (VAR_EXIT_SCRIPT2 != 0xFF && VAR(VAR_EXIT_SCRIPT2))
       runScript(VAR(VAR_EXIT_SCRIPT2), 0, 0, 0);
+
+#ifdef ENABLE_SCUMM_7_8
+   // WORKAROUND: The spider lair (room 44) will optionally play the sound
+   // of trickling water (sound 215), but it never stops it. The same sound
+   // effect is also used in room 33, so let's do the same fade out that it
+   // does in that room's exit script.
+   if (_game.id == GID_DIG && _currentRoom == 44) {
+      int scriptCmds[] = { 14, 215, 0x600, 0, 30 };
+      _sound->soundKludge(scriptCmds, ARRAYSIZE(scriptCmds));
+   }
+#endif
 }
 
 void ScummEngine::runEntryScript() {



 Reply with quote  
Post Sun Jan 08, 2012 3:51 pm 
 View user's profile Send private message
kvn8907



Joined: 05 Jan 2012
Posts: 9
 

Thank you very much for the speedy and informative answer.

At this point, I just have two more questions.

First, is there anything I can do on my end to get around this issue?

Second, how long might it take to create a workaround? (I'm not out sick anymore, so I can be very patient.)

 Reply with quote  
Post Sun Jan 08, 2012 4:13 pm 
 View user's profile Send private message
kvn8907



Joined: 05 Jan 2012
Posts: 9
 

quote:
Originally posted by tsoliman
You seem confident you have a reproducible bug.

Forum rule 3a


I wasn't sure it was a bug when I started this thread. Hence why I was wondering if anyone else would get this repeating sound if they loaded the game from where I did.
 Reply with quote  
Post Sun Jan 08, 2012 4:26 pm 
 View user's profile Send private message
eriktorbjorn
ScummVM Developer


Joined: 31 Oct 2005
Posts: 3149
 

quote:
Originally posted by kvn8907

First, is there anything I can do on my end to get around this issue?



When I played the original, the sound stopped on its own eventually. I don't know if that happens in ScummVM as well. Pressing Ctrl+D to bring up the debug console, and then type imuse stop 215 followed by exit might work, too. (You could also use imuse panic to stop all currently running sounds, if nothing else helps.)

quote:
Originally posted by kvn8907

Second, how long might it take to create a workaround? (I'm not out sick anymore, so I can be very patient.)


I'm not quite sure what you mean by that question. The patch I posted is such a workaround, so it's already created, but I want to give some people a chance to tell me that "no, that's the wrong approach" first.

Committing it to the trunk means it would show up in daily builds, and that could happen very soon. But it wouldn't show up in a stable release until 1.5.0, and that's... I don't know, but I'd guess 4-6 months away. It could also be committed to the 1.4 branch, in which case it would be in the 1.4.1 release which may be less than a month away. But I personally don't think it's serious enough to warrant that. Not when it also happens in the original game.
 Reply with quote  
Post Sun Jan 08, 2012 4:41 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page 1, 2  Next


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge