All pastes #452023 Raw Edit

hora fm box

public text v1 · immutable
·published 2007-04-22 00:22 UTC
rendered paste body
PAL.Loop := False; 
function ActivePlayer:TPlayer; forward;
Queue.Clear;


const TimeHeader  : String = 'D:\Sonidos FM BOX\Programas\Es La Hora\Es La Hora.mp3';
const TimeHours   : String = 'D:\Sonidos FM BOX\Programas\Es La Hora\voces\HH';
const TimeMinutes : String = 'D:\Sonidos FM BOX\Programas\Es La Hora\voces\MM';
const TimePGM  : String = 'D:\Sonidos FM BOX\Programas\Es La Hora\';
const MyGMTZone   : Integer = -4;


var C,N          : Integer;
var fname        : String;
var fnamehh      : String;
var fnamemm      : String;
var fnamepgm      : String;
var ampm         : String;
var E : DateTime = Queue.ETA;    // Return the length of the queues
var hh,mm,ss,ms : Integer;


   DecodeTime(Now,hh,mm,ss,ms);
   if (hh = 0) then hh := 24;
   WriteLn('The Time Is '+IntToStr(hh)+':'+IntToStr(mm));

   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);
         
         
       fnamepgm := IntToStr(hh)+IntToStr(mm)+'.mp3';
       WriteLn(fnamepgm);


   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(TimePGM+fnamepgm,ipBottom);
Cat['Station IDs (All)'].QueueBottom(smLemmingLogic, NoRules);
CAT['Spot 2'].QueueBottom(smLemmingLogic, NoRules);
Cat['CierrePausa'].QueueBottom(smLemmingLogic, NoRules);


function ActivePlayer:TPlayer;
begin
if DeckA.Status = psPlaying then
Result := DeckA
else
Result := DeckB;
end;