Opened 19 years ago

Closed 19 years ago

#1958 closed defect (fixed)

FT: Soundchannels regression

Reported by: SF/jerrywoolsey Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Full Throttle


Using version 0.8.0CVS Mar 17 It crashes with the de-bugger window opening and then drops to desktop. English version Win XP Worked on 0.8.0 beginning of the month

Ticket imported from: #1165771. Ticket imported from: bugs/1958.

Change History (11)

comment:1 by eriktorbjorn, 19 years ago

I can't reproduce this, but in a case like this it should print an error message in the debug console. Does it and, if so, what does it say?

comment:2 by SF/jerrywoolsey, 19 years ago

Sorry I should have written this down earlier:

ERROR: (1:59:0x86) : SmushMixer :: AddChannel(3) : no channel available

comment:3 by eriktorbjorn, 19 years ago

Hmm... Well, I did notice yesterday that there seems to be a regression in the current development version that could cause it to think that a sound handle is busy when it's not. Perhaps it's related to that.

comment:4 by sev-, 19 years ago

Fingolfin, it was obviously caused by that SoundHandle change. Just wait couple seconds until intro starts. We usually skip that part so it left unnoticed :)

comment:5 by sev-, 19 years ago

Owner: set to fingolfin
Summary: Debugger window opening on startupFT: Soundchannels regression

comment:6 by fingolfin, 19 years ago

I can't look at this currently as I am away on a conference. One thing that I can think of is that with the change of SoundHandle to be a uint32, we do not get automatic initialisation anymore. So all code using one would have to set it to 0 in the appropriate constructor. Maybe I'll just change it back to a struct type which gets automatic initialiosation, and which uses some standard C++ tricks to emulate an uint32 in all other regards...

And actually, I did try the FT intro before commiting this change, and i worked just fine back then for me... maybe this isan optimization/host sysyem dependant bug? Anyway, I can't say anything useful before I am back home (end of next week).

comment:7 by eriktorbjorn, 19 years ago

I came to the same conclusion a few days ago about some Broken Sword II regressions. I sent a mail to scummvm-devel about it, though if you're at a conference I can understand if you missed that.

(By the way, I'm not sure but I don't think initialising the handle to zero is enough the way isSoundHandleActive() is currently implemented.)

comment:8 by fingolfin, 19 years ago

Yo Erik,

hmm, the only thing in isSoundHandleActive() which I perceive as problematic in the "handle == 0" case: A handle of "0" might actually be used. This is easily fixed, however.

I just checked in some code which might help the issue (I am still not at home, but now am visiting some friends, and I was able to plugin my laptop here :-). Note that it was and still is working fine for me, so i dunno if my changes actually have had any effect...

comment:9 by eriktorbjorn, 19 years ago

That's the problem I meant: that handle 0 might be used. In fact I have a nagging feeling that this is the very case I was seeing in Broken Sword 2, but I never bothered to verify that.

Since I never saw the Full Throttle bug myself, I can't say whether or not your changes have any effect on it. I can, however, confirm that you've fixed both BS2 regressions for me. Thanks!

For reference, they were:

* Starting the game with the "-b 866" command-line option. An MPEG cutscene is showing, but there's no voice-over. My guess is that it was waiting for sound handle 0 to become free, and that this was used for the cutscene audio.

* Starting the game with the "-b 3878" command-line option. Nico never started speaking. Again, I'm guessing it was waiting for sound handle 0 to become free, and that this was used by the background music.

But, as I said, they both work fine now.

comment:10 by sev-, 19 years ago

Resolution: fixed
Status: newclosed

comment:11 by sev-, 19 years ago

FT bug has been fixed as well. Thanks, Max. Closing.

Note: See TracTickets for help on using tickets.