globalvar gpsound, gpsound_volume, gpsound_emitter;
gpsound = [];
gpsound_volume = 0.7;
gpsound_emitter = audio_emitter_create();
audio_emitter_gain(gpsound_emitter, gpsound_volume);

enum SOUND {
	PLACE,
	UPGRADE,
	EXPLOSION,
	SELECT,
	SELECT2,
	CANCEL,
	ENEMY_DEATH,
	ENEMY_DEATH2,
	SIZE
};

var _path = PATH_DATA + "sound/";

gpsound[SOUND.PLACE] = audio_create_stream(_path + "place_turret.ogg");
gpsound[SOUND.UPGRADE] = audio_create_stream(_path + "upgrade.ogg");
gpsound[SOUND.EXPLOSION] = audio_create_stream(_path + "explosion.ogg");
gpsound[SOUND.SELECT] = audio_create_stream(_path + "select.ogg");
gpsound[SOUND.SELECT2] = audio_create_stream(_path + "select2.ogg");
gpsound[SOUND.CANCEL] = audio_create_stream(_path + "cancel.ogg");
gpsound[SOUND.ENEMY_DEATH] = audio_create_stream(_path + "enemy_death.ogg");
gpsound[SOUND.ENEMY_DEATH2] = audio_create_stream(_path + "enemy_death2.ogg");

globalvar gpmusic, gpmusic_volume, gpmusic_emitter;
gpmusic = [];
gpmusic_volume = 0.5;
gpmusic_emitter = audio_emitter_create();
audio_emitter_gain(gpmusic_emitter, gpmusic_volume);

enum MUSIC {
	MAIN,
	MENU,
	GAME_OVER,
	VICTORY,
	SIZE
};

_path = PATH_DATA + "music/";

gpmusic[MUSIC.MAIN] = audio_create_stream(_path + "main.ogg");
gpmusic[MUSIC.MENU] = audio_create_stream(_path + "menu.ogg");
gpmusic[MUSIC.GAME_OVER] = audio_create_stream(_path + "gameover.ogg");
gpmusic[MUSIC.VICTORY] = audio_create_stream(_path + "victory.ogg");