Note that this Wiki is a work in progress, items may not be updated or may disappear entirely as the pages are updated.

Looping files in queue over and over again

From SpacialAudio

Jump to: navigation, search

This script will rotate the songs in the queue, i.e. the songs in the queue will loop over and over again

var Song : TSongInfo;
var Q    : TDataSet;
PAL.Loop := True;
PAL.WaitForPlayCount(1);
PAL.LockExecution;
Q := Query('SELECT filename FROM historylist ORDER BY date_played DESC',[],True);
if not Q.IsEmpty then
Queue.AddFile(Q['filename'],ipBottom);
Q.Free;
PAL.UnlockExecution;