[Scummvm-devel] Fw: SCI: SQ4 Talkie DoSound

Walter van Niftrik walter at vanniftrik-it.nl
Mon Jul 6 11:54:30 CEST 2009


M. Kiewitz wrote:

> Just found another problem and somewhat solved it.
> SQ4 uses DoSound on resources that don't exist, actually the
> resource exists as audio resource. Also the SCI script needs
> a DoSound-event back so that it continues with the game
> (intro of SQ4 for example).

Right. BTW, this is not exclusive to SQ4CD, we need this for SCI1.1 
games in general. We should check for an audio resource first, and if it 
doesn't exist, try a sound resource.

> I'm not quite done yet, as I said I had to change data/size to Resource to get resource-header within the iterator. Also currently the iterator just creates the event immediately without even playing the sample - I would need to split SfxState::getAudioStream, so that I can get the audio stream for playing from an actual resource instead of a resource number. That way I should be able to calculate sample duration and then get the event fired at the correct moment.

Isn't it sufficient to use testResource() to test for existence of an 
audio resource, and then do something similar to kSciAudioPlay in 
DoAudio? startAudio() returns the sample length in ticks so that should 
be enough information to delay the iterator the appropriate amount of time.

Regards,

Walter




More information about the Scummvm-devel mailing list