| 1 |
#ifndef __FMOPL_H_ |
| 2 |
#define __FMOPL_H_ |
| 3 |
|
| 4 |
|
| 5 |
#define OPL_SAMPLE_BITS 16 |
| 6 |
|
| 7 |
|
| 8 |
#ifndef OSD_CPU_H |
| 9 |
#define OSD_CPU_H |
| 10 |
typedef unsigned char UINT8; |
| 11 |
typedef unsigned short UINT16; |
| 12 |
typedef unsigned int UINT32; |
| 13 |
typedef signed char INT8; |
| 14 |
typedef signed short INT16; |
| 15 |
typedef signed int INT32; |
| 16 |
|
| 17 |
typedef int BOOL; |
| 18 |
#endif |
| 19 |
|
| 20 |
#if (OPL_SAMPLE_BITS==16) |
| 21 |
typedef INT16 OPLSAMPLE; |
| 22 |
#endif |
| 23 |
#if (OPL_SAMPLE_BITS==8) |
| 24 |
typedef INT8 OPLSAMPLE; |
| 25 |
#endif |
| 26 |
|
| 27 |
|
| 28 |
typedef void (*OPL_TIMERHANDLER)(int channel,double interval_Sec); |
| 29 |
typedef void (*OPL_IRQHANDLER)(int param,int irq); |
| 30 |
typedef void (*OPL_UPDATEHANDLER)(int param,int min_interval_us); |
| 31 |
typedef void (*OPL_PORTHANDLER_W)(int param,unsigned char data); |
| 32 |
typedef unsigned char (*OPL_PORTHANDLER_R)(int param); |
| 33 |
|
| 34 |
int YM3812Init(int num, int clock, int rate); |
| 35 |
void YM3812Shutdown(void); |
| 36 |
void YM3812ResetChip(int which); |
| 37 |
int YM3812Write(int which, int a, int v, const int *volume); |
| 38 |
unsigned char YM3812Read(int which, int a); |
| 39 |
void YM3812Mute(int which,int channel,BOOL mute); |
| 40 |
int YM3812TimerOver(int which, int c); |
| 41 |
void YM3812UpdateOne(int which, INT16 *buffer, int length); |
| 42 |
|
| 43 |
void YM3812SetTimerHandler(int which, OPL_TIMERHANDLER TimerHandler, int channelOffset); |
| 44 |
void YM3812SetIRQHandler(int which, OPL_IRQHANDLER IRQHandler, int param); |
| 45 |
void YM3812SetUpdateHandler(int which, OPL_UPDATEHANDLER UpdateHandler, int param); |
| 46 |
|
| 47 |
#endif |