Author Topic: Looping Audio in SCI1.1?  (Read 17 times)

0 Members and 1 Guest are viewing this topic.

Offline cdb-boop

Looping Audio in SCI1.1?
« on: Yesterday at 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 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 which supports looping but is not "authentic"?

Is there a best or intended way to loop Audio in SCI1.1?



Offline cdb-boop

Re: Looping Audio in SCI1.1?
« Reply #1 on: Yesterday at 08:20:08 PM »
Never mind. I realized you can just call an Audio resource with DoSound and loop with -1 infinitely.


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

Page created in 0.042 seconds with 21 queries.