Name
SetVolume -- modify volume of a sample
Synopsis
SetVolume(id,volume)
Function
This function modifies the volume of the sample specified by id. If the sample is currently playing, the volume will be modified on-the-fly which can be used for sound fades etc.

Starting with Hollywood 2.0, volume can also be a string containing a percent specification, e.g. "50%".

Inputs
id
identifier of a sample
volume
new volume for the sample (range: 0=mute until 64=full volume or percent specification)
Example
LoadSample(1, "Sound/Samples/GroovyLoop.wav")
PlaySample(1)
Wait(100)
For k = 64 To 0 Step -1
   SetVolume(1,vol)
Next
The above code loads the sample "Sound/Samples/GroovyLoop.wav", plays it, waits 2 seconds and then does a fade out.

Show TOC