Code: Selecteer alles
PAL.Loop:=True;
var I : Integer;
var SongA : TsongInfo;
SongA := Activeplayer.GetSonginfo();
PAL.LockExecution;
I := 0 ; // Statistics Relay nummer (#) -1 (min één) !!!!
begin;
WriteStr('Relay number '); WriteLn(I);
WriteStr('--Active: '); WriteLn(Relays[I].Active);
// WriteStr('--Status: '); WriteLn(Relays[I].Status);
end;
PAL.UnlockExecution;
If Relays[I].Active = False or (SongA['songtype'] = 'C') then
//do nothing
Else
Queue.AddUrl('http://host:port/',ipTop); // IP + poort van stream die gestart moet worden.
PAL.WaitForTime(T['+00:00:05']); // PAL script was soms te snel waardoor stream soms 2x in queue stond. 5 sec pauze dus.
If Relays[I].Active = False or (SongA['songtype'] = 'C') then
//do nothing
Else
PAL.WaitForPlayCount(1); // Stream is in de queue !!! Wacht 1 plaat
If Relays[I].Active = False or (SongA['songtype'] = 'C') then
//do nothing
Else
PAL.WaitForPlayCount(1); // Stream is aan het spelen !!! Wacht tot stream stopt ...
SongA.Free;
PAL.WaitForTime(T['+00:00:25']); // 25 seconden pauze voor volgende stream check
PAL.LockExecution;