Author Topic: `DoSound sndSTOP` stops another sound resource?!  (Read 1759 times)

0 Members and 1 Guest are viewing this topic.

Offline ZvikaZ

`DoSound sndSTOP` stops another sound resource?!
« on: April 13, 2020, 11:31:03 AM »
Hi there to all SCI experts.

I've found something strange with SQ4, while investigating a bug report on ScummVM, and would really like your advice.
It seems to me like some bug in original Sierra SCI interpreter, but I'd like to hear more opinions regarding the situation...

The short story:
Open SQ4 in SCICompanion, and make the following changes to script #1:

Add at the beginning:
Code: [Select]
(use Sound)

Change in `changeState`, state 0 to be:
Code: [Select]
(0
;Z (gLongSong loop: -1 playBed:)
(myPukeSound play:)
(gLongSong number: 886 loop: 1 play:)
(DoSound sndSTOP myPukeSound)     ;why does it stop?
;Z end
(= cycles 1)

Add at the end of the file:

Code: [Select]
(instance myPukeSound of Sound
(properties
number 162   ; try to change me to 9
)
)


Now, no sound will play at all, because of the `(DoSound sndSTOP myPukeSound)`.
(you can comment it and listen that it does play)
Why?
It doesn't make sense to me.

Furthermore, if we change `myPukeSound ` to use other sound resource, such as 9, then the `sndSTOP ` doesn't stop the music.

Is there any logic to this behaviour?
Or is it indeed some kind of a bug in the original SCI interperter?

The long story:
I've got to this while investigating https://bugs.scummvm.org/ticket/11265, and suggested a fix to one of the issues at https://github.com/scummvm/scummvm/pull/2165.
You can read there all the details.

Thanks!
Zvika




SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.021 seconds with 22 queries.