
#include "ofFmodUtils.h"


static bool bFmodInitialized = false;

// dsp callback?
// interesting?
// http://66.102.9.104/search?q=cache:LM47mq8hytwJ:www.cleeker.com/doxygen/audioengine__fmod_8cpp-source.html+FSOUND_Sample_Load+cpp&hl=en&ct=clnk&cd=18&client=firefox-a

// ---------------------------------------------------------------------------- 
void initializeFmod(){

	// linux users:
	// an example of setting up fmod for different audio systems 
	// is in this code:
	// http://66.102.9.104/search?q=cache:LM47mq8hytwJ:www.cleeker.com/doxygen/audioengine__fmod_8cpp-source.html+FSOUND_Sample_Load+cpp&hl=en&ct=clnk&cd=18&client=firefox-a
	

	if (bFmodInitialized == false){
		if (FSOUND_GetVersion() < FMOD_VERSION){
			printf("Error : You are using the wrong DLL version!  You should be using FMOD %.02f\n", FMOD_VERSION);
			return;
		}
		FSOUND_Init( 44100, 32, 0 );
		
		//FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND);	// Direct Sound
		//FSOUND_SetDriver(0);
		//FSOUND_SetMixer(FSOUND_MIXER_AUTODETECT);
		
		bFmodInitialized = true;
	}
}


void closeFmod(){
	FSOUND_Close();
}
