Pips In Aux1

On the hour, the BBC Time Pips. It plays in AUX1.

The file/directory containing the pips file is here.
[ddownload id=”157″ style=”button” button=”blue” text=”Pips”]

// BBC Time pips at 5 seconds to the hour in AUX1
PAL.loop := true; 
var P1, P2 : TPlayer; 
var i : integer; 
var Song : TSongInfo;
var D: Integer; 
var F : Boolean;
var E : DateTime = Queue.ETA;

ActivePlayer.Volume := 255; // in case there is a track change, leaving the volume off

PAL.WaitForTime('XX:59:55');     // wait for the hour

PAL.LockExecution;
//   uses    F:\My Documents\RadioDaze\Times\Gts_(bbc)_pips.ogg'

P1 := ActivePlayer; 
// Get what the Volume is set to
i := ActivePlayer.GetVolume; 
 // Detect the empty player and queue a station ID in it
P2 := Aux1; 
IdlePlayer.Volume := i; 
if P2 <> nil then 
Song := Cat['Pips'].ChooseSong(smLRP, noRules);
if Song <> nil then 
P2.QueueSong(Song); 
// Reduce the Active Player by 50%
// Divide by 3 to get 33%, etc. 
ActivePlayer.Volume := i/5; 
P2.play;
PAL.WaitForTime('+00:00:05');
// Reset Volume Back To Normal
ActivePlayer.Volume := 255; 
IdlePlayer.Volume := 255;
DeckA.Volume := 255;
DeckB.Volume := 255;
Song.Free;
PAL.UnlockExecution;
// ==========================
function ActivePlayer:TPlayer;
begin 
if DeckA.Status = psPlaying then 
Result := DeckA 
else 
Result := DeckB; 
end; 

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload CAPTCHA.