//ds2_main.c
#include <libBAG.h>

SNDObj_t Music;

void ds2_main(void){
	//initiate library with console
	if(!BAG_Init(1))
		ds2_plug_exit();

	//initiate debug text
	//DBG_HALT - stops the program on any debug message
	//DBG_LIB - displays debug messages from libBAG functions
	BAG_DBG_Init(NULL, DBG_HALT | DBG_LIB);

	BAG_DBG_Msg("loading audio\n");
	BAG_DBG_Msg("load: %d\n", BAG_Audio_LoadSndExt("/test", &Music));
	BAG_DBG_Msg("audio loaded, playing\n");
	BAG_Audio_PlaySnd(&Music, 0);

	while(1){
		BAG_Update();
	}
}

