
/************************************************
 **
 **		Sort of a wrapper for BASS.
 **     Its just to streamline it to my needs,
 **
 ************************************************/

#ifndef _WRAPBASS
#define _WRAPBASS

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "include/bass.h"

//static HWND win=NULL;
//static HINSTANCE inst;
const int AUD_VOLMAX = 100;
const int AUD_VOLMID = 50;
const int AUD_VOLMIN = 0;
const int AUD_NULL   = 0;
const int AUD_8BIT   = BASS_DEVICE_8BITS;
const int AUD_MONO   = BASS_DEVICE_MONO;
const int AUD_3D     = BASS_DEVICE_3D;
const int AUD_A3D    = BASS_DEVICE_A3D;
const int AUD_NOSYNC = BASS_DEVICE_NOSYNC;

//Audio types
const int AUD_SAMPLE = 1;
const int AUD_MODULE = 2;
const int AUD_MP3    = 3;

class cAudio
{
	public:

		bool init(unsigned int flags,int mixrate,int musvol,int samvol,int strmvol,float bufsize,boolean logvol,boolean logpan);
		void stats();
		boolean addstream(char *filename,unsigned int flags);
		void play();
		void give(int *left,int *right);
		void givemid(int *mid);
		void dumpbuf(char *buf,int num);
		int givemid();
		boolean kill();

		//void CALLBACK Pan(HSYNC handle, DWORD channel, void *buffer, DWORD length, DWORD user);
		void PanOn();
		void PanOff();
		//void CALLBACK Echo(HSYNC handle, DWORD channel, void *buffer, DWORD length, DWORD user);
		void EchoOn();
		void EchoOff();
		//void CALLBACK Flange(HSYNC handle, DWORD channel, void *buffer, DWORD length, DWORD user);
		void FlangeOn();
		void FlangeOff();



		int marker;
		char type;

		bool flange;
		bool echo;
		bool pan;

		BASS_INFO AUD_DEVICE;

};
/*
static typedef struct
{
	int marker;
	char type;		//0=nothing, 1=sample, 2=mod, 3=mp3
} audios;


//Functions in this .h:

bool audio_init(unsigned int flags,int mixrate,int musvol,int samvol,int strmvol,float bufsize,boolean logvol,boolean logpan);
//Inits BASS with parameters

void audio_stats();
//Dumps sounddriver data

boolean audio_addstream(char *filename,audios *sound,unsigned int flags);
//Adds a file, depending on extension

void audio_play(audios sound);
//Plays a file from a handle

void audio_give(audios sound,int *left,int *right);
//Returns LEVELS for left and right channels(0..128)

void audio_give(audios sound,int *mid);
//Returns average LEVEL for left+right channels(0..128)

int audio_givemid(audios *sound);
//Returns average LEVEL for left+right channels(0..128)

boolean audio_kill();
//Deinit BASS

*/
#endif _WRAPBASS