
local angle = 0.0;
local x = 0.0;
local syncCustoDone = false;
local syncJannyDone = false;
local syncCusto2Done = false;
local syncHarryDone = false;
local syncMultDone = false;
local syncSoundDone = false;

function Init()
	angle = 0.0;
	x = 0.0;
end

function Modify(object, t)
	object.angle = math.sin(t)*90;
--	angle = angle + dt*150.0;
	object.x = t*450;
--	x = x + dt*100.0;
end

function SyncRing(object, t)
	if not syncSoundDone then
		object:AddVoiceSync(3.2, "Ring");
		syncSoundDone = true;
	end
end

function SyncMessage(object, t)
	if not syncSoundDone then
		object:AddVoiceSync(6.0, "Message");
		syncSoundDone = true;
	end
end

function SyncMessageClick(object, t)
	if not syncSoundDone then
		object:AddVoiceSync(1.0, "MessageClick");
		syncSoundDone = true;
	end
end

function SyncKnock(object, t)
	if not syncSoundDone then
		object:AddVoiceSync(5.2, "Knock");
		syncSoundDone = true;
	end
end


function SyncMult01(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult01");
		syncMultDone = true;
   end
end

function SyncMult02(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult02");
		syncMultDone = true;
   end
end

function SyncMult03(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult03");
		syncMultDone = true;
   end
end



function SyncMult11(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult21");
		syncMultDone = true;
   end
end

function SyncMult12(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult22");
		syncMultDone = true;
   end
end

function SyncMult22(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult31");
		syncMultDone = true;
   end
end


function SyncMult31(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult41");
		syncMultDone = true;
   end
end
function SyncMult32(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult42");
		syncMultDone = true;
   end
end
function SyncMult33(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult43");
		syncMultDone = true;
   end
end
function SyncMult34(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult44");
		syncMultDone = true;
   end
end

function SyncMult42(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult52");
		syncMultDone = true;
   end
end
function SyncMult43(object, t)
	if not syncMultdone then
		object:AddVoiceSync(0.0, "mult53");
		syncMultDone = true;
   end
end

function SyncJanny0s1(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(0.5, "intro011");
		syncJannyDone = true;
   end
end

function SyncCusto0s2(object, t)
	if not syncCustoDone then
		object:AddVoiceSync(3.0, "intro022");
		syncCustoDone = true;
   end
end

function SyncJanny0s2(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(1.5, "intro021");
		syncJannyDone = true;
   end
end



function SyncCusto0s3(object, t)
	if not syncCustoDone then
		object:AddVoiceSync(0.5, "intro031");
		syncCustoDone = true;
   	end
end


function SyncJanny0s3(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(6.5, "intro032");
		object:AddVoiceSync(23.0, "intro034");
		object:AddVoiceSync(34.5, "intro036");
		syncJannyDone = true;
   	end
end



function SyncCusto20s3(object, t)
	if not syncCusto2Done then
		object:AddVoiceSync(20.0, "intro033");
		object:AddVoiceSync(32.0, "intro035");
		syncCusto2Done = true;
   	end
end

function SyncJanny1s1(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(3.5, "mult112");
		syncJannyDone = true;
   	end
end

function SyncJanny1s2(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(0.5, "mult121");
		object:AddVoiceSync(3.5, "mult123");
		object:AddVoiceSync(10.5, "mult125");
		object:AddVoiceSync(21.0, "mult127");
		object:AddVoiceSync(27.5, "mult129");
		object:AddVoiceSync(37.5, "mult1211");
		object:AddVoiceSync(43.0, "mult1213");
		syncJannyDone = true;
   	end
end

function SyncHarry1s2(object, t)
	if not syncHarryDone then
		object:AddVoiceSync(1.5, "mult122");
		object:AddVoiceSync(5.5, "mult124");
		object:AddVoiceSync(12.5, "mult126");
		object:AddVoiceSync(25.0, "mult128");
		object:AddVoiceSync(31.5, "mult1210");
		object:AddVoiceSync(39.0, "mult1212");
		object:AddVoiceSync(47.0, "mult1214");
		syncHarryDone = true;
   	end
end

function SyncJanny2s2(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(1.0, "mult221");
		syncJannyDone = true;
   	end
end


function SyncJanny3s1(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(6.0, "mult312");
		syncJannyDone = true;
   	end
end

function SyncJanny3s2(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(2.5, "mult322");
		object:AddVoiceSync(9.0, "mult324");
		syncJannyDone = true;
   	end
end

function SyncHarry3s2(object, t)
	if not syncHarryDone then
		object:AddVoiceSync(0.5, "mult321");
		object:AddVoiceSync(4.0, "mult323");
		syncHarryDone = true;
   	end
end



function SyncJanny3s3(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(8.5, "mult332");
		object:AddVoiceSync(32.5, "mult334");
		object:AddVoiceSync(44.5, "mult336");
		object:AddVoiceSync(56.0, "mult338");
		syncJannyDone = true;
   	end
end

function SyncHarry3s3(object, t)
	if not syncHarryDone then
		object:AddVoiceSync(0.5, "mult331");
		object:AddVoiceSync(10.5, "mult333");
		object:AddVoiceSync(34.5, "mult335");
		object:AddVoiceSync(46.0, "mult337");
		object:AddVoiceSync(60.0, "mult339");
		syncHarryDone = true;
   	end
end


function SyncHarry3s4(object, t)
	if not syncHarryDone then
		object:AddVoiceSync(1.5, "mult341");
		object:AddVoiceSync(13.5, "mult343");
		syncHarryDone = true;
   	end
end

function SyncJanny3s4(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(10.0, "mult342");
		syncJannyDone = true;
   	end
end


function SyncJanny4s2(object, t)
	if not syncJannyDone then
		object:AddVoiceSync(3.5, "mult422");
		object:AddVoiceSync(14.5, "mult424");
		object:AddVoiceSync(24.5, "mult426");
		syncJannyDone = true;
   	end
end

function SyncHarry4s2(object, t)
	if not syncHarryDone then
		object:AddVoiceSync(0.5, "mult421");
		object:AddVoiceSync(6.5, "mult423");
		object:AddVoiceSync(16.5, "mult425");
		object:AddVoiceSync(26.5, "mult427");
		syncHarryDone = true;
   	end
end

function SyncHarry4s3(object, t)
	if not syncHarryDone then
		object:AddVoiceSync(4.0, "mult431");
		syncHarryDone = true;
   	end
end