<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
> > Actually I went the other way. If no sound resource is found, try to look for an audio resource.<br>> >We should first check for an audio (i.e. digitized sfx) resource and then <br>> >for a sound (i.e. synthesized<br>> >sfx) resource. This part of the code is used to play sound effects, and <br>> >SCI1.1 games have two sets<br>> >of sound effects: one for users with Soundblaster-compatible sound cards, <br>> >and one for users with<br>> >sound cards that can't play digital sound effects. We should prefer <br>> >digital sfx over their synthesized<br>> >counterparts, hence the order that Walter proposed. This is easy to check <br>> >when starting KQ6, just<br>> >try to move the plank on the beach.<br>> <br>> If the resources match, then that's fine. On SQ4 at least the audio resources that I checked never had sound counterparts.<br><br>Yeah but that doesn't matter, as the audio resources will be preferred anyway, and with the current code (check for an audio resource, then a sound resource), all games play happily, so there's no reason to make a per-game exception here.<br><br>> >> Still this would require a new iterator as well. So doing one that is <br>> >>just taking milliseconds as<br>> >> input and then fires the event when its done?<br>> >Er... no? Why would it require a new iterator? Right now, the sound <br>> >effect is played, and the sound<br>> >effect duration is returned to the game scripts. What would a new <br>> >iterator offer? I'm a bit confused<br>> >about the design you're proposing here...<br>> <br>> That's enough for the scripts? Well then it's fine. I'm not really familiar with the SCI engine, I noticed that doing SI_FINISHED (also) let the script continue.<br><br>Having played the first scene in SQ4 again, it loses sync when the sound effect is heard, so the current implementation is definitely not right. Perhaps the scripts are waiting for the sound sample to finish and we're telling them that it already has finished (by returning the full sound duration), so it seems that we shouldn't return the full sound duration to the scripts like what kDoAudio does, but rather do it with an iterator. So your initial assumption is right, my apologies, we do need an iterator for this to work correctly (as SCI syncs some animations with sound and music, which clearly fails in that scene in SQ4CD), but I'm not sure if we need a new iterator (most likely), or if the current iterator can be expanded to handle sound effects as well. <br><br>If you're willing to work on this, feel free to do it :) A good test case would be the first scene in SQ4CD, the scrolling animation after the ship flies away.<br><br>> >> There's now a patch.<br>> >Where can this patch be found?<br>> <br>> I actually meant your "patch" ;-)<br><br>Ah :)<br><br>Regards<br>
Filippos<br><br><br /><hr />Windows Live™ SkyDrive™: Get 25 GB of free online storage.   <a href='http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009' target='_new'>Get it on your BlackBerry or iPhone.</a></body>
</html>