#ifndef __Finch_h__
#define __Finch_h__
#import <OpenAL/al.h>
#import <OpenAL/alc.h>

class Finch
{
private:
	bool openAudioSession();
	bool initOpenAL();
private:
	ALCdevice *device;
	ALCcontext *context;
	bool userMusicPlaying;
	UInt32 sessionCategory;
public:
	Finch();
	~Finch();
	bool init();
	// Returns YES if there is some other sound playing,
	// for example the iPod.
	bool getUserMusicPlaying();
	void setMixWithSystemSound(bool mix);
	//
	// If set to YES, your sound will mix with the system
	// sound. The downside is that when the mix is on, MP3
	// decoding performance drops significantly:
	//
	// http://stackoverflow.com/questions/1009385
	//
	// By default we turn the mixing on if there is something
	// playing when you initialize Finch.
	//
	bool getMixWithSystemSound();
	
	void setSessionCategory(UInt32 cat);
	UInt32 getSessionCategory();
};
#endif