mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-01 00:21:14 +00:00
rename EVENT_PARAMS to MAX_EVENT_PARAMS
This commit is contained in:
parent
0bfa332fd9
commit
b4456d1b4c
5 changed files with 16 additions and 16 deletions
|
@ -54,13 +54,13 @@ fluid_rvoice_eventhandler_push(fluid_rvoice_eventhandler_t* handler,
|
|||
}
|
||||
|
||||
int
|
||||
fluid_rvoice_eventhandler_push_param(fluid_rvoice_eventhandler_t* handler, fluid_rvoice_function_t method, void* object, fluid_rvoice_param_t param[EVENT_PARAMS])
|
||||
fluid_rvoice_eventhandler_push_param(fluid_rvoice_eventhandler_t* handler, fluid_rvoice_function_t method, void* object, fluid_rvoice_param_t param[MAX_EVENT_PARAMS])
|
||||
{
|
||||
fluid_rvoice_event_t local_event;
|
||||
|
||||
local_event.method = method;
|
||||
local_event.object = object;
|
||||
FLUID_MEMCPY(&local_event.param, param, sizeof(*param) * EVENT_PARAMS);
|
||||
FLUID_MEMCPY(&local_event.param, param, sizeof(*param) * MAX_EVENT_PARAMS);
|
||||
|
||||
return fluid_rvoice_eventhandler_push_LOCAL(handler, &local_event);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ typedef struct _fluid_rvoice_eventhandler_t fluid_rvoice_eventhandler_t;
|
|||
struct _fluid_rvoice_event_t {
|
||||
fluid_rvoice_function_t method;
|
||||
void* object;
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS];
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS];
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -90,7 +90,7 @@ int fluid_rvoice_eventhandler_push_ptr(fluid_rvoice_eventhandler_t* handler,
|
|||
|
||||
int fluid_rvoice_eventhandler_push_param(fluid_rvoice_eventhandler_t* handler,
|
||||
fluid_rvoice_function_t method, void* object,
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS]);
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS]);
|
||||
|
||||
static FLUID_INLINE void
|
||||
fluid_rvoice_eventhandler_add_rvoice(fluid_rvoice_eventhandler_t* handler,
|
||||
|
|
|
@ -4184,7 +4184,7 @@ fluid_synth_set_reverb_full_LOCAL(fluid_synth_t* synth, int set, double roomsize
|
|||
double damping, double width, double level)
|
||||
{
|
||||
int ret;
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS];
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS];
|
||||
|
||||
if (set & FLUID_REVMODEL_SET_ROOMSIZE)
|
||||
synth->reverb_roomsize = roomsize;
|
||||
|
@ -4374,7 +4374,7 @@ fluid_synth_set_chorus_full(fluid_synth_t* synth, int set, int nr, double level,
|
|||
double speed, double depth_ms, int type)
|
||||
{
|
||||
int ret;
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS];
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS];
|
||||
|
||||
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
|
||||
/* if non of the flags is set, fail */
|
||||
|
|
|
@ -48,27 +48,27 @@ fluid_voice_get_lower_boundary_for_attenuation(fluid_voice_t* voice);
|
|||
|
||||
#define UPDATE_RVOICE0(proc) \
|
||||
do { \
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS]; \
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS]; \
|
||||
fluid_rvoice_eventhandler_push_param(voice->eventhandler, proc, voice->rvoice, param); \
|
||||
} while (0)
|
||||
|
||||
#define UPDATE_RVOICE_GENERIC_R1(proc, obj, rarg) \
|
||||
do { \
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS]; \
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS]; \
|
||||
param[0].real = rarg; \
|
||||
fluid_rvoice_eventhandler_push_param(voice->eventhandler, proc, obj, param); \
|
||||
} while (0)
|
||||
|
||||
#define UPDATE_RVOICE_GENERIC_I1(proc, obj, iarg) \
|
||||
do { \
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS]; \
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS]; \
|
||||
param[0].i = iarg; \
|
||||
fluid_rvoice_eventhandler_push_param(voice->eventhandler, proc, obj, param); \
|
||||
} while (0)
|
||||
|
||||
#define UPDATE_RVOICE_GENERIC_I2(proc, obj, iarg1, iarg2) \
|
||||
do { \
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS]; \
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS]; \
|
||||
param[0].i = iarg1; \
|
||||
param[1].i = iarg2; \
|
||||
fluid_rvoice_eventhandler_push_param(voice->eventhandler, proc, obj, param); \
|
||||
|
@ -76,7 +76,7 @@ fluid_voice_get_lower_boundary_for_attenuation(fluid_voice_t* voice);
|
|||
|
||||
#define UPDATE_RVOICE_GENERIC_IR(proc, obj, iarg, rarg) \
|
||||
do { \
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS]; \
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS]; \
|
||||
param[0].i = iarg; \
|
||||
param[1].real = rarg; \
|
||||
fluid_rvoice_eventhandler_push_param(voice->eventhandler, proc, obj, param); \
|
||||
|
@ -100,7 +100,7 @@ fluid_voice_update_volenv(fluid_voice_t* voice,
|
|||
fluid_real_t min,
|
||||
fluid_real_t max)
|
||||
{
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS];
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS];
|
||||
|
||||
param[0].i = section;
|
||||
param[1].i = count;
|
||||
|
@ -132,7 +132,7 @@ fluid_voice_update_modenv(fluid_voice_t* voice,
|
|||
fluid_real_t min,
|
||||
fluid_real_t max)
|
||||
{
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS];
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS];
|
||||
|
||||
param[0].i = section;
|
||||
param[1].i = count;
|
||||
|
@ -177,7 +177,7 @@ static void fluid_voice_swap_rvoice(fluid_voice_t* voice)
|
|||
|
||||
static void fluid_voice_initialize_rvoice(fluid_voice_t* voice, fluid_real_t output_rate)
|
||||
{
|
||||
fluid_rvoice_param_t param[EVENT_PARAMS];
|
||||
fluid_rvoice_param_t param[MAX_EVENT_PARAMS];
|
||||
|
||||
FLUID_MEMSET(voice->rvoice, 0, sizeof(fluid_rvoice_t));
|
||||
|
||||
|
|
|
@ -213,12 +213,12 @@ typedef union _fluid_rvoice_param_t
|
|||
} fluid_rvoice_param_t;
|
||||
typedef void (*fluid_rvoice_function_t)(void* obj, fluid_rvoice_param_t* param);
|
||||
|
||||
enum { EVENT_PARAMS = 6 };
|
||||
enum { MAX_EVENT_PARAMS = 6 };
|
||||
|
||||
/* macro for declaring an rvoice event function (#fluid_rvoice_function_t). the functions may only access those params that were
|
||||
* previously set in fluid_voice.c
|
||||
*/
|
||||
#define DECLARE_FLUID_RVOICE_FUNCTION(name) void name(void* obj, fluid_rvoice_param_t param[EVENT_PARAMS])
|
||||
#define DECLARE_FLUID_RVOICE_FUNCTION(name) void name(void* obj, fluid_rvoice_param_t param[MAX_EVENT_PARAMS])
|
||||
|
||||
|
||||
/***************************************************************
|
||||
|
|
Loading…
Reference in a new issue