2006-02-24 04:48:15 +00:00
|
|
|
#ifndef __FMOPL_H_
|
|
|
|
#define __FMOPL_H_
|
|
|
|
|
2006-09-14 00:02:31 +00:00
|
|
|
#include "zstring.h"
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
/* select output bits size of output : 8 or 16 */
|
|
|
|
#define OPL_SAMPLE_BITS 16
|
|
|
|
|
|
|
|
/* compiler dependence */
|
|
|
|
#ifndef OSD_CPU_H
|
|
|
|
#define OSD_CPU_H
|
|
|
|
typedef unsigned char UINT8; /* unsigned 8bit */
|
|
|
|
typedef unsigned short UINT16; /* unsigned 16bit */
|
|
|
|
typedef unsigned int UINT32; /* unsigned 32bit */
|
|
|
|
typedef signed char INT8; /* signed 8bit */
|
|
|
|
typedef signed short INT16; /* signed 16bit */
|
|
|
|
typedef signed int INT32; /* signed 32bit */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (OPL_SAMPLE_BITS==16)
|
|
|
|
typedef INT16 OPLSAMPLE;
|
|
|
|
#endif
|
|
|
|
#if (OPL_SAMPLE_BITS==8)
|
|
|
|
typedef INT8 OPLSAMPLE;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
typedef void (*OPL_TIMERHANDLER)(int channel,double interval_Sec);
|
|
|
|
typedef void (*OPL_IRQHANDLER)(int param,int irq);
|
|
|
|
typedef void (*OPL_UPDATEHANDLER)(int param,int min_interval_us);
|
|
|
|
typedef void (*OPL_PORTHANDLER_W)(int param,unsigned char data);
|
|
|
|
typedef unsigned char (*OPL_PORTHANDLER_R)(int param);
|
|
|
|
|
|
|
|
|
|
|
|
int YM3812Init(int num, int clock, int rate);
|
|
|
|
void YM3812Shutdown(void);
|
|
|
|
void YM3812ResetChip(int which);
|
|
|
|
int YM3812Write(int which, int a, int v);
|
|
|
|
unsigned char YM3812Read(int which, int a);
|
|
|
|
int YM3812TimerOver(int which, int c);
|
2008-03-29 01:30:37 +00:00
|
|
|
void YM3812UpdateOne(int which, float *buffer, int length);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void YM3812SetTimerHandler(int which, OPL_TIMERHANDLER TimerHandler, int channelOffset);
|
|
|
|
void YM3812SetIRQHandler(int which, OPL_IRQHANDLER IRQHandler, int param);
|
|
|
|
void YM3812SetUpdateHandler(int which, OPL_UPDATEHANDLER UpdateHandler, int param);
|
|
|
|
|
2006-09-14 00:02:31 +00:00
|
|
|
FString YM3812GetVoiceString();
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
#endif
|