
-- Semicolons are not required in Lua code
title = "Beep Test"
require([[defines]]);
require([[functions]]);

--[[---------------------------------------------------------------------------------------]]
function setup(Engine, TIU)
	print("setup() Running");
	return true;		-- false=setup failed, true=setup succeeded
	end
--[[---------------------------------------------------------------------------------------]]
function loop(Engine, TIU)
	-- Always call Sleep(X) at least once in this function if it returns true;
	print("loop() Running");
	--[[
	-- Beep()  play default beep sound
    -- Beep(0) play default beep sound
    -- Beep(1) play critical stop sound
    -- Beep(2) play question sound
    -- Beep(3) play exclamation sound
    -- Beep(4) play asterisk sound
	]]
	print("Default Default beep sound");
	retv = Beep();
	if (retv == false) then print("Beep() failed"); end;
	Sleep (3);
	print("Default beep sound");
	retv = Beep(DEFAULT_BEEP);
	if (retv == false) then print("Beep() failed"); end;
	Sleep (3);
	print("Critical stop sound");
	retv = Beep(CRITICAL_STOP);
	if (retv == false) then print("Beep() failed"); end;
	Sleep (3);
	print("Question sound");
	retv = Beep(QUESTION);
	if (retv == false) then print("Beep() failed"); end;
	Sleep (3);
	print("Exclamation sound");
	retv = Beep(EXCLAMATION);
	if (retv == false) then print("Beep() failed"); end;
	Sleep (3);
	print("Asterisk sound");
	retv = Beep(ASTERISK);
	if (retv == false) then print("Beep() failed"); end;
	Sleep (5);
	print("Almost Done...");
	return Stop("DONE");
	end
--[[---------------------------------------------------------------------------------------]]
function cleanup(Engine, TIU)
	-- this function is called once when the user presses the [STOP] button
	print("cleanup() Running");
	return true;		-- false=cleanup failed, true=cleanup succeeded
	end
--[[---------------------------------------------------------------------------------------]]
