From c57fbf50e7b5f94efc697b1d8ef387a5b2b4a5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Wed, 21 Jun 2017 06:34:00 +0200 Subject: audio/fmopl: modify timer callback to give opaque and channel parameters in two arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Message-id: 20170621043401.19842-2-hpoussin@reactos.org Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'hw/audio/fmopl.h') diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index fc9f16b..f4065f4 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -3,7 +3,7 @@ #include -typedef void (*OPL_TIMERHANDLER)(int channel,double interval_Sec); +typedef void (*OPL_TIMERHANDLER)(void *param, int channel, double interval_Sec); /* !!!!! here is private section , do not access there member direct !!!!! */ @@ -87,13 +87,14 @@ typedef struct fm_opl_f { uint8_t wavesel; /* external event callback handler */ OPL_TIMERHANDLER TimerHandler; /* TIMER handler */ - int TimerParam; /* TIMER parameter */ + void *TimerParam; /* TIMER parameter */ } FM_OPL; /* ---------- Generic interface section ---------- */ FM_OPL *OPLCreate(int clock, int rate); void OPLDestroy(FM_OPL *OPL); -void OPLSetTimerHandler(FM_OPL *OPL,OPL_TIMERHANDLER TimerHandler,int channelOffset); +void OPLSetTimerHandler(FM_OPL *OPL, OPL_TIMERHANDLER TimerHandler, + void *param); int OPLWrite(FM_OPL *OPL,int a,int v); unsigned char OPLRead(FM_OPL *OPL,int a); -- cgit v1.1