#pragma once

#include <map>
#include "GameCore.h"
#include "fmod.h"
#include <fstream>

using namespace std;

typedef map<int,FSOUND_SAMPLE*> SoundMap;
typedef map<int,FSOUND_SAMPLE*>::iterator SoundMapIterator;

class SoundManager
{
public:
	SoundManager(void);
	~SoundManager(void);
	HRESULT loadSoundFromFile( char* filename );
	int loadSound( char* fileName );
	HRESULT playSound( int whichSound, bool looping );
	HRESULT playSoundFX( int whichSound );
	void unloadSound( int whichSound );
	void stopCurrentBackground();
	void stopMusic( int whichSound );
private:
	SoundMap sounds;
	int currentAvailableIndex;
	int playing;
};
