Good morning, all.
I need help with my pal script, copied below.
I use it to broadcast locally produced news update at the half-hour mark and it works just fine. The problem I have, though, is I also have pre-recorded shows as well as live stream relays that last one hour or more and it would be nice if I could make the script to not distrupt such shows.
What obtains presently is that when it's time for the news update, sam fades out the current show. But I don't want that to happen, I want sam to either not play the news update at all if I have 20+ minutes left on the active player, or just pause active player, take the news update and return to the show.
Another question, though unrelated: I the past I could adjust the weight of certain songs to make them play more frequently than others but I don't know how to do that in this sam4.9.4. Any help on that too, would be appreciated.
You guys have helped me greatly in the past and I appreciate it.
Code:
PAL.LOOP := True;
Pal.WaitforTime ('XX:29:45'); {## Wait for next hour}
Queue.Clear;
CAT['Station Image'].QueueTOP(smLRP, NoRules);
Queue.AddFile('C:\news\News Update.mp3',ipTop);
ActivePlayer.FadeToNext;
function ActivePlayer:TPlayer;
begin
if DeckA.Status = psPlaying then
Result := DeckA
else
Result := DeckB;
end;
//ActivePlayer.FadeToNext; {Uncomment If You Would Like to start news immediately after it has loaded}