#ifndef TURBOFM_H
#define TURBOFM_H

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

#ifndef TFCPLAYER_H
#include "tfcplayer.h"
#endif

#ifndef TFDPLAYER_H
#include "tfdplayer.h"
#endif

typedef struct {
	unsigned char *data;
	void *chip0;
	void *chip1;
	int size;
	int rate;
	int scount;
	BOOL play;
	BOOL tfc;
	TFCP TFCP;
	TFDP TFDP;
} TFM;

void tfm_write(TFM *TFM,int chip,int reg,unsigned char val);
BOOL tfm_open(TFM *TFM,const char *filename,unsigned char *data,int size,int clock,int rate);
void tfm_close(TFM *TFM);
void tfm_player_render(TFM *TFM,short int *buf,int size);

#endif
