|
@@ -164,27 +164,29 @@ typedef struct operator_struct {
|
|
|
} op_type;
|
|
|
|
|
|
|
|
|
+typedef struct opl_chip_struct opl_chip;
|
|
|
+
|
|
|
// enable an operator
|
|
|
-void enable_operator(Bitu regbase, op_type* op_pt);
|
|
|
+void enable_operator(opl_chip* opl, Bitu regbase, op_type* op_pt);
|
|
|
|
|
|
// functions to change parameters of an operator
|
|
|
-void change_frequency(Bitu chanbase, Bitu regbase, op_type* op_pt);
|
|
|
+void change_frequency(opl_chip* opl, Bitu chanbase, Bitu regbase, op_type* op_pt);
|
|
|
|
|
|
-void change_attackrate(Bitu regbase, op_type* op_pt);
|
|
|
-void change_decayrate(Bitu regbase, op_type* op_pt);
|
|
|
-void change_releaserate(Bitu regbase, op_type* op_pt);
|
|
|
-void change_sustainlevel(Bitu regbase, op_type* op_pt);
|
|
|
-void change_waveform(Bitu regbase, op_type* op_pt);
|
|
|
-void change_keepsustain(Bitu regbase, op_type* op_pt);
|
|
|
-void change_vibrato(Bitu regbase, op_type* op_pt);
|
|
|
-void change_feedback(Bitu chanbase, op_type* op_pt);
|
|
|
+void change_attackrate(opl_chip* opl, Bitu regbase, op_type* op_pt);
|
|
|
+void change_decayrate(opl_chip* opl, Bitu regbase, op_type* op_pt);
|
|
|
+void change_releaserate(opl_chip* opl, Bitu regbase, op_type* op_pt);
|
|
|
+void change_sustainlevel(opl_chip* opl, Bitu regbase, op_type* op_pt);
|
|
|
+void change_waveform(opl_chip* opl, Bitu regbase, op_type* op_pt);
|
|
|
+void change_keepsustain(opl_chip* opl, Bitu regbase, op_type* op_pt);
|
|
|
+void change_vibrato(opl_chip* opl, Bitu regbase, op_type* op_pt);
|
|
|
+void change_feedback(opl_chip* opl, Bitu chanbase, op_type* op_pt);
|
|
|
|
|
|
// general functions
|
|
|
-void adlib_init(Bit32u samplerate);
|
|
|
-void adlib_write(Bitu idx, Bit8u val);
|
|
|
-void adlib_getsample(Bit16s* sndptr, Bits numsamples);
|
|
|
+opl_chip* adlib_init(Bit32u samplerate);
|
|
|
+void adlib_write(opl_chip* opl, Bitu idx, Bit8u val);
|
|
|
+void adlib_getsample(opl_chip* opl, Bit16s* sndptr, Bits numsamples);
|
|
|
|
|
|
-Bitu adlib_reg_read(Bitu port);
|
|
|
-void adlib_write_index(Bitu port, Bit8u val);
|
|
|
+Bitu adlib_reg_read(opl_chip* opl, Bitu port);
|
|
|
+void adlib_write_index(opl_chip* opl, Bitu port, Bit8u val);
|
|
|
|
|
|
-static Bit32u generator_add; // should be a chip parameter
|
|
|
+void adlib_release(opl_chip* opl);
|