#include "../sound.txt"
#include "../music.txt"

let soundObj = [];
	
task TSound(numb,vol)
	{
	LoadCommonDataAreaA2("CONFIG",GetCurrentScriptDirectory ~ "../data/CONFIG");
	ObjSound_SetSoundDivision(soundObj[numb], SOUND_SE);
	ObjSound_SetVolumeRate(soundObj[numb],GetAreaCommonData("CONFIG","SOUND_VOLUME",1)*vol);
	ObjSound_Play(soundObj[numb]);
	}

task TSoundStop(numb)
	{
	ObjSound_Stop(soundObj[numb]);
	}

function InitializeSound
	{
	ascent(i in 0..55)
		{
		soundObj = soundObj ~ [ObjSound_Create];
		let path = GetCurrentScriptDirectory ~ "../se/" ~ ToString(SENumbToName(i)) ~ ".wav";
		ObjSound_Load(soundObj[i],path);	
		}
	}