1 #pragma once 2 3 #ifndef __YMF262_H__ 4 #define __YMF262_H__ 5 6 /* select number of output bits: 8 or 16 */ 7 #define OPL3_SAMPLE_BITS 16 8 9 typedef INT16 OPL3SAMPLE; 10 11 typedef void (*OPL3_TIMERHANDLER)(INT32, INT32 timer,double period); 12 typedef void (*OPL3_IRQHANDLER)(INT32, INT32 irq); 13 typedef void (*OPL3_UPDATEHANDLER)(); 14 15 16 void *ymf262_init(int clock, int rate, void (*irq_cb)(INT32, INT32), void (*timer_cb)(INT32, INT32, double)); 17 void ymf262_shutdown(void *chip); 18 void ymf262_reset_chip(void *chip); 19 int ymf262_write(void *chip, int a, int v); 20 unsigned char ymf262_read(void *chip, int a); 21 int ymf262_timer_over(void *chip, int c); 22 void ymf262_update_one(void *chip, INT16 **buffers, int length); 23 void ymf262_save_state(void *chippy, INT32 nAction); 24 25 #endif /* __YMF262_H__ */ 26