Code: Selecteer alles
PAL.LockExecution;
var P : TPlayer;
var Song : TSongInfo;
var i : integer;
PAL.Loop := True;
PAL.WaitForPlayCount(5);
// Get what the Volume is set to
i := ActivePlayer.GetVolume;
//Writeln ('Volume set to: '+IntToStr(i));
P := SoundFX;
Song := CAT['jingles (All)'].ChooseSong(smRandom,NoRules);
if Song <> nil then P.QueueSong(Song);
// Reduce the Active Player by 50%
// Divide by 3 to get 33%, etc.
ActivePlayer.Volume := i - 40;
//ActivePlayer.Volume := 60;
P.Play;
// Reset Volume Back To Normal
ActivePlayer.Volume := i - 40;
ActivePlayer.Volume := i;
//PAL.UnlockExecution;
PAL.WaitForTime('+00:00:10');
P.Eject;