make param array of fluid_rvoice_function_t const

This commit is contained in:
derselbst 2018-04-11 19:22:55 +02:00
parent 0af950a1e2
commit 78de299da4
2 changed files with 2 additions and 3 deletions

View file

@ -502,7 +502,6 @@ fluid_mixer_buffers_init(fluid_mixer_buffers_t* buffers, fluid_rvoice_mixer_t* m
*/ */
DECLARE_FLUID_RVOICE_FUNCTION(fluid_rvoice_mixer_set_samplerate) DECLARE_FLUID_RVOICE_FUNCTION(fluid_rvoice_mixer_set_samplerate)
{ {
int i;
fluid_rvoice_mixer_t* mixer = obj; fluid_rvoice_mixer_t* mixer = obj;
fluid_real_t samplerate = param[1].real; // becausee fluid_synth_update_mixer() puts real into arg2 fluid_real_t samplerate = param[1].real; // becausee fluid_synth_update_mixer() puts real into arg2

View file

@ -214,12 +214,12 @@ typedef union _fluid_rvoice_param_t
fluid_real_t real; fluid_real_t real;
} fluid_rvoice_param_t; } fluid_rvoice_param_t;
enum { MAX_EVENT_PARAMS = 6 }; /**< Maximum number of #fluid_rvoice_param_t to be passed to an #fluid_rvoice_function_t */ enum { MAX_EVENT_PARAMS = 6 }; /**< Maximum number of #fluid_rvoice_param_t to be passed to an #fluid_rvoice_function_t */
typedef void (*fluid_rvoice_function_t)(void* obj, fluid_rvoice_param_t param[MAX_EVENT_PARAMS]); typedef void (*fluid_rvoice_function_t)(void* obj, const fluid_rvoice_param_t param[MAX_EVENT_PARAMS]);
/* Macro for declaring an rvoice event function (#fluid_rvoice_function_t). The functions may only access /* 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 * 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[MAX_EVENT_PARAMS]) #define DECLARE_FLUID_RVOICE_FUNCTION(name) void name(void* obj, const fluid_rvoice_param_t param[MAX_EVENT_PARAMS])
/*************************************************************** /***************************************************************