Files
TempleOS-Rijn/LT/Demo/Music.CPZ
T
2018-09-08 21:45:20 +02:00

36 lines
725 B
Plaintext

void SongEndTsk()
{
Sound(0);
Exit;
}
void SongTsk()
{
//See $LK,"Play","MN:Play"$() for notation.
Preempt(ON);
//Define a end-task call back so
//the sound will stop if the
//window is closed.
Fs->end_task_cb=&SongEndTsk;
ResetMusicSettings;
while (TRUE) {
Play("1wCqDsEFG2AB");
Play("wCqDsEFG3AB");
Play("wCqDsEFG4AB");
Play("wCqDsEFG5AB");
Play("wCqDsEFG6AB");
}
}
Spawn(&SongTsk,"Background Song");
coutln "$$FG,PURPLE$$A task has been spawned to "
"play music in the background.";
coutln "Use $$LK,\"TaskRep\",\"MN:TaskRep\"$$() to "
"kill it.$$FG$$";
Auto("TaskRep;\r"); //Make it visible so people see the name, TaskRep