var strFile, strPath : String; var P,F : Tplayer; strPath := 'd:\RADIO\Clock\'; PAL.Loop:=True; PAL.WaitForTime('XX:59:50'); PAL.LockExecution; strFile := strPath + FormatDateTime('hh', now+1/24) + '-00.mp3'; Case strFile Of 'd:\RADIO\Clock\07-00.mp3' : Begin If (DayOfWeek(Now) = Sunday) Or (DayOfWeek(Now) = Monday) then Queue.AddFile('d:\RADIO\news\новость 18.mp3', ipTop) Else Queue.AddFile('d:\RADIO\news\новость 20.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\08-00.mp3' : Begin If (DayOfWeek(Now) = Sunday) Or (DayOfWeek(Now) = Monday) then Queue.AddFile('d:\RADIO\news\новость 18.mp3', ipTop) Else Queue.AddFile('d:\RADIO\news\новость 20.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\09-00.mp3' : Begin Queue.AddFile('d:\RADIO\news\гороскоп.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\11-00.mp3' : Begin Queue.AddFile('d:\RADIO\news\гороскоп.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\12-00.mp3' : Begin Queue.AddFile('d:\RADIO\news\новость 12.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\13-00.mp3' : Begin Queue.AddFile('d:\RADIO\news\новость 12.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\15-00.mp3' : Begin Queue.AddFile('d:\RADIO\news\новость 15.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\16-00.mp3' : Begin Queue.AddFile('d:\RADIO\news\новость 15.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\18-00.mp3' : Begin Queue.AddFile('d:\RADIO\news\новость 18.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\19-00.mp3' : Begin If (DayOfWeek(Now) <> Sunday) AND (DayOfWeek(Now) <> Saturday) then Queue.AddFile('d:\RADIO\news\новость 18.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; 'd:\RADIO\Clock\20-00.mp3' : Begin If (DayOfWeek(Now) = Sunday) Or (DayOfWeek(Now) = Saturday) then Queue.AddFile('d:\RADIO\news\новость 18.mp3', ipTop) Else Queue.AddFile('d:\RADIO\news\новость 20.mp3', ipTop); Queue.AddFile(strFile, ipTop); Aux1.QueueSong(Queue.NextInQueue); If DeckA.Status = psPlaying then Begin DeckB.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; F := DeckA; P := DeckB; Aux1.FadeToPlay; End Else Begin DeckA.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; F := DeckB; P := DeckA; Aux1.FadeToPlay; End; End; Else Begin Queue.AddFile(strFile, ipTop); If DeckA.Status = psPlaying then Begin Aux1.QueueSong(Queue.NextInQueue); DeckA.FadeToPause; P := DeckA; F := DeckB; Aux1.FadeToPlay; End Else Begin Aux1.QueueSong(Queue.NextInQueue); DeckB.FadeToPause; P := DeckB; F := DeckA; Aux1.FadeToPlay; End; End; End; PAL.UnlockExecution; PAL.WaitForTime('+00:00:09'); P.FadeToPlay; If P.Status <> psPlaying then F.Play Else F.QueueSong(Queue.NextInQueue);
var Song : TSongInfo; var P : TPlayer; PAL.Loop := True; PAL.WaitForTime('+00:05:00'); P := SoundFX; if P <> nil then begin Song := CAT['Sound FX (All)'].ChooseSong(smRandom,NoRules); if Song <> nil then begin P.QueueSong(Song); // P.Play; end; end;
var Song : TSongInfo; var P : TPlayer; var i : integer; PAL.Loop := True; i := ActivePlayer.GetVolume; PAL.WaitForTime('+00:05:00'); ActivePlayer.Volume := i - 40; ActivePlayer.Volume := i - 80; ActivePlayer.Volume := i - 120; ActivePlayer.Volume := i - 160; P := SoundFX; if P <> nil then begin Song := CAT['Sound FX (All)'].ChooseSong(smRandom,NoRules); if Song <> nil then begin PAL.WaitForTime('+00:00:10'); ActivePlayer.Volume := i - 160; ActivePlayer.Volume := i - 120; ActivePlayer.Volume := i - 80; ActivePlayer.Volume := i - 40; ActivePlayer.Volume := i; P.QueueSong(Song); P.Play; end; end;
var Song : TSongInfo; var P : TPlayer; var i : integer; PAL.Loop := True; i := ActivePlayer.GetVolume; PAL.Loop := True; PAL.WaitForTime('+00:05:59'); ActivePlayer.Volume := i - 20; ActivePlayer.Volume := i - 40; ActivePlayer.Volume := i - 60; ActivePlayer.Volume := i - 70; P := SoundFX; if P <> nil then begin Song := CAT['Sound FX (All)'].ChooseSong(smRandom,NoRules); if Song <> nil then begin P.QueueSong(Song); // P.Play; end; end; PAL.WaitForTime('+00:00:05'); ActivePlayer.Volume := i
PAL.Loop := True ; var verzoek, song : TSongInfo; var map, almost, ready : string ; Song := ActivePlayer.GetSongInfo; if (Song['songtype'] = 'J') then begin PAL.WaitForTime('+00:00:10'); end else Song.Free; Song := ActivePlayer.GetSongInfo; map := 'c:\test\nu.mp3' ; verzoek := CAT['nu'].ChooseSong(smRandom, NoRules) ; almost := 'Now Playing.'+Song['artist']+'. with.'+Song['title']+'.' ; ready := URLEncode(almost) ; WebToFile(map,'http://translate.google.com/translate_tts?tl=en&q='+ready) ; Aux2.QueueSong(verzoek); Aux2.Play; PAL.WaitForPlayCount(1) ;