29 #ifndef AUDIO_SOFTSYNTH_OPL_NUKED_H 30 #define AUDIO_SOFTSYNTH_OPL_NUKED_H 32 #include "common/scummsys.h" 33 #include "audio/fmopl.h" 35 #ifndef DISABLE_NUKED_OPL 37 #ifndef OPL_ENABLE_STEREOEXT 38 #define OPL_ENABLE_STEREOEXT 0 41 #define OPL_WRITEBUF_SIZE 1024 42 #define OPL_WRITEBUF_DELAY 2 47 typedef struct _opl3_slot opl3_slot;
48 typedef struct _opl3_channel opl3_channel;
49 typedef struct _opl3_chip opl3_chip;
79 uint16_t pg_phase_out;
89 #if OPL_ENABLE_STEREOEXT 128 uint8_t tremoloshift;
139 #if OPL_ENABLE_STEREOEXT 146 int16_t oldsamples[4];
149 uint64_t writebuf_samplecnt;
150 uint32_t writebuf_cur;
151 uint32_t writebuf_last;
152 uint64_t writebuf_lasttime;
156 void OPL3_Generate(
opl3_chip *chip, int16_t *buf);
157 void OPL3_GenerateResampled(
opl3_chip *chip, int16_t *buf);
158 void OPL3_Reset(
opl3_chip *chip, uint32_t samplerate);
159 void OPL3_WriteReg(
opl3_chip *chip, uint16_t reg, uint8_t v);
160 void OPL3_WriteRegBuffered(
opl3_chip *chip, uint16_t reg, uint8_t v);
161 void OPL3_GenerateStream(
opl3_chip *chip, int16_t *sndptr, uint32_t numsamples);
163 void OPL3_Generate4Ch(
opl3_chip *chip, int16_t *buf4);
164 void OPL3_Generate4ChResampled(
opl3_chip *chip, int16_t *buf4);
165 void OPL3_Generate4ChStream(
opl3_chip *chip, int16_t *sndptr1, int16_t *sndptr2, uint32_t numsamples);
173 void dualWrite(uint8 index, uint8 reg, uint8 val);
182 void write(
int a,
int v);
184 void writeReg(
int r,
int v);
189 void generateSamples(int16 *buffer,
int length);
195 #endif // !DISABLE_NUKED_OPL
bool isStereo() const
Definition: nuked.h:186
OplType
Definition: fmopl.h:58