let bgm_Stage = "bgm_Stage";
let bgm_Boss = "bgm_Boss";
let musicObj;

task PlayMusic(numb)
	{
	musicObj = ObjSound_Create;
	StopSound(GetCurrentScriptDirectory ~ "bgm/bgm_Boss.wav");
	StopSound(GetCurrentScriptDirectory ~ "bgm/bgm_Stage.wav");
	RemoveSound(GetCurrentScriptDirectory ~ "bgm/bgm_Boss.wav");
	RemoveSound(GetCurrentScriptDirectory ~ "bgm/bgm_Stage.wav");
	ObjSound_SetRestartEnable(musicObj,false);
	ObjSound_Load(musicObj,GetCurrentScriptDirectory ~ "bgm/" ~ ToString(numb) ~ ".ogg");
	ObjSound_SetSoundDivision(musicObj, SOUND_BGM);
	ObjSound_Play(musicObj);

 
	ObjSound_SetRestartEnable(musicObj,true);   
	}