{# Add files to queue script #} Queue.Clear; Queue.AddList('E:\Musik\Playlist\Основной.M3U',ipTop); Queue.Shuffle; deckA.Play;
{ CONFIGURATION } {==================================================} const bannertext_file = 'C:\Program Files\SpacialAudio\SAMBC\PAL\BannerText.txt'; const change_interval = '+00:00:15'; {==================================================} { IMPLEMENTATION } {--------------------------------------------------} var CurSong : TSongInfo; var UpdSong : TSongInfo; var Banners : TStringList; var Toggle : Boolean = True; var LinePos : Integer = 0; {Set this script to restart itself} PAL.Loop := True; { Create some objects that we will need} UpdSong := TSongInfo.Create; Banners := TStringList.Create; { Load banner lines into stringlist object } if FileExists(bannertext_file) then Banners.LoadFromFile(bannertext_file) else WriteLn('Banner source file does not exist!'); LinePos := 0; while (LinePos<Banners.Count) do begin {Wait for specified time} PAL.WaitForTime(change_interval); {Retrieve the current banner line and assign it to song object} UpdSong['title'] := Banners[LinePos]; {Tell encoders to update song information: When Toggle is True, we use the normal song information from the active player - otherwise we use our banner song object } Toggle := not Toggle; if Toggle then begin CurSong := ActivePlayer.GetSongInfo; Encoders.SongChange(CurSong); CurSong.Free; end else Encoders.SongChange(UpdSong); {Move to the next line in the banner file before we continue} LinePos := LinePos + 1; end; {Destroy objects once we no longer need them} Banners.Free; UpdSong.Free;
var D : TDataSet; var P : TPlayer; var Song : TSongInfo; var S : TSongInfo; PAL.Loop := true; procedure pause(); begin PAL.WaitForTime ('+00:00:07'); end; S:=TSongInfo.Create; P:= ActivePlayer; Song := P.GetSongInfo; S['artist'] := ''; S['duration'] := 0; S['title'] := 'Трек: ' + Song['artist'] + ' - ' + Song['title']; Encoders.SongChange(S); PAL.WaitForTime ('+00:00:15'); P := ActivePlayer; Song := P.GetSongInfo; S['artist'] := ''; S['duration'] := 0; if StrToInt(Song['albumyear'])>1980 then S['title'] := 'Релиз: ' + Song['album']+' ('+Song['albumyear']+')' else S['title'] := 'Релиз: ' + Song['album']; Encoders.SongChange(S); PAL.WaitForTime ('+00:00:07'); if song['requestid'] > 0 then D := Query('SELECT * FROM requestlist WHERE ID = :J AND SongID = :I',[Song['requestID'],Song['ID']],true); if D['name'] <> '' then begin S['artist'] := ''; S['title'] := 'Заказал(а): '+D['name']; S['duration'] := 0; Encoders.SongChange(S); pause(); end; if D['msg'] <> '' then begin S['artist'] := ''; S['title'] := 'Текст: '+D['msg']; S['duration'] := 0; Encoders.SongChange(S); pause(); pause(); end; D.Free; P.Free; Song.Free;