Kan wel weekschedule gebruiken maar goed het kan in veel korter script zoals hier maar waarom werkt het niet.
Sorry voor me slechte nederlands btw.
Code: Selecteer alles
function ActivePlayer:TPlayer; forward;
PAL.Loop := True;
const TimeHeader : String = 'E:\StationPromo\Times\header.mp3';
const TimeHours : String = 'E:\StationPromo\Times\Hours\';
const TimeMinutes : String = 'E:\StationPromo\Times\Minutes\';
const MyGMTZone : Integer = +10;
var C,N : Integer;
var fname : String;
var fnamehh : String;
var fnamemm : String;
var ampm : String;
var E : DateTime = Queue.ETA; // Return the length of the queues
var hh,mm,ss,ms : Integer;
N := 0;
while N < 24 do begin
DecodeTime(Now,hh,mm,ss,ms);
if (hh = 0) then hh := 24;
WriteLn('The Time Is '+IntToStr(hh)+':'+IntToStr(mm));
//WriteLn('Wait for 10 Minutes'); // Say time every ten minutes
//PAL.WaitForTime(T['+00:10:00']);
//PAL.WaitForPlayCount(1);
//DecodeTime(Now,hh,mm,ss,ms);
E := Queue.ETA; // You could even wait for the current
DecodeTime(E,hh,mm,ss,ms); // cue length of time to finish
if (hh <= 9) then
fnamehh := '0'+IntToStr(hh)+'.mp3' //get the right file name
else
fnamehh := IntToStr(hh)+'.mp3'; //get the right file name
WriteLn(fnamehh);
if (mm <= 9) then
fnamemm := '0'+IntToStr(mm)+'.mp3' //get the right file name
else
fnamemm := IntToStr(mm)+'.mp3'; //get the right file name
WriteLn(fnamemm);
WriteLn('SayTime at '+IntToStr(hh)+':'+IntToStr(mm)); // Just checking
//PAL.WaitForTime(E);
// you need to reverse the order, mm - hh - header, so that the header
// ends up in queuetop.
//Queue.AddFile(TimeMinutes+fnamemm,ipTop);
//Queue.AddFile(TimeHours+fnamehh,ipTop);
//Queue.AddFile(TimeHeader,ipTop);
//ActivePlayer.FadeToNext; // then fade to say the time.
Queue.AddFile(TimeHeader,ipBottom);
Queue.AddFile(TimeHours+fnamehh,ipBottom);
Queue.AddFile(TimeMinutes+fnamemm,ipBottom);
PAL.WaitForTime(E);
PAL.WaitForQueue(4); // wait till the queue fills again - 4 or more
// but what does it do in the even that
N := N+1;
end;
function ActivePlayer:TPlayer;
begin
if DeckA.Status = psPlaying then
Result := DeckA
else
Result := DeckB;
end;http://support.spacialaudio.com/wiki/UP ... acks_play.