Page 1 of 1

Play Sound Improvements?

PostPosted: Sun Oct 26, 2003 10:08 am
by jazz_e_bob
Set loop to infinite.

Set pan and volume without restarting the sound.

(This way the pan and volume of a sound could track an actors position on the screen. 8) )

PostPosted: Sun Oct 26, 2003 10:10 am
by jazz_e_bob
You would also need a way to stop the sound when the actor was destroyed...

PostPosted: Sun Oct 26, 2003 6:13 pm
by jazz_e_bob
:D

OK

PlaySound returns a handle to that sound (or 0 for error).

Once playing you can adjust volume and pan on that channel.

setPan(chan, amount);
setVol(chan, amount);
setMute(chan, value);

8) Another pretty standard item is the mute switch. Lots of cool effects to be had with one of these...

Ultimately you want to build a sophisticated sample playback system that includes pitch and even envelope control... later down the track maybe? :)

setPitch(chan, amount);

PostPosted: Sun Oct 26, 2003 10:09 pm
by makslane
PlaySound will can returns the channel to do this