Community
SCI Programming => SCI Development Tools => Topic started by: cdb-boop on April 25, 2026, 06:25:00 PM
-
I'm porting a SCI1 game to the SCI Companion's SCI1.1 template game and some of the SCI1 Sound assets have a digital track embedded. I used Sierra Resource Viewer (https://sciwiki.sierrahelp.com/index.php/Sierra_Resource_Viewer) to extract all the digital tracks as WAV files and add them as Audio resources (using unused numbers, as Sound and Audio assets share a namespace).
I have been auditing the code's 374 play: calls and making modifications to affected sounds. For example, using (DoSound sndGET_AUDIO_CAPABILITY) to dynamically swap between using Sound and Audio asset depending on audio driver. I also ended up creating a DigitalSound wrapper class to emulate cases of dynamically setting a Sound object's number property for play later.
So far I've found two cases (battle yelling and tavern chatter) where a Sound with a digital track is looped for ambiance. I looked at the SCI Companion Docs but I didn't see a way to loop DoAudio in SCI1.1. Is there a built-in way to loop Audio, like setting the Sound class's loop property to -1? I was wondering if it was possible to attach a script to a room's script to detect when it was time to loop the audio, or make a global list like gSounds or global object like gMusic and add check in the main game loop. Or should I just use gumby's sciAudio (https://sciprogramming.com/community/index.php?PHPSESSID=e0992273f7d941509d32f5df6f205f8f&topic=634.0) which supports looping but is not "authentic"?
Is there a best or intended way to loop Audio in SCI1.1?
-
Never mind. I realized you can just call an Audio resource with DoSound and loop with -1 infinitely.