mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-08 05:51:46 +00:00
3a5afd1418
can be played as OPL can also be dumped. - Removed the opl_enable cvar, since OPL playback is now selectable as just another MIDI device. - Added support for DRO playback and dual-chip RAW playback. - Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with MUSSong2 works just as well. There are still lots of leftover bits in the class that should probably be removed at some point, too. - Added dual-chip dumping support for the RAW format. - Added DosBox Raw OPL (.DRO) dumping support. For whatever reason, in_adlib calculates the song length for this format wrong, even though the exact length is stored right in the header. (But in_adlib seems buggy in general; too bad it's the only Windows version of Adplug that seems to exist.) - Rewrote the OPL dumper to work with MIDI as well as MUS. SVN r872 (trunk)
42 lines
1.5 KiB
C
42 lines
1.5 KiB
C
#ifndef __FMOPL_H_
|
|
#define __FMOPL_H_
|
|
|
|
#include "zstring.h"
|
|
|
|
// Multiplying OPL_SAMPLE_RATE by ADLIB_CLOCK_MUL gives the number
|
|
// Adlib clocks per second, as used by the RAWADATA file format.
|
|
|
|
/* 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
|
|
|
|
|
|
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);
|
|
void YM3812UpdateOne(int which, float *buffer, int length);
|
|
|
|
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);
|
|
|
|
FString YM3812GetVoiceString();
|
|
|
|
#endif
|