constify function parameters if possible

This commit is contained in:
derselbst 2018-10-30 17:39:50 +01:00
parent ee5b0ea1c7
commit ffdf5b89d7
7 changed files with 13 additions and 13 deletions

View file

@ -383,7 +383,7 @@ fluid_chorus_set(fluid_chorus_t *chorus, int set, int nr, fluid_real_t level,
}
void fluid_chorus_processmix(fluid_chorus_t *chorus, fluid_real_t *in,
void fluid_chorus_processmix(fluid_chorus_t *chorus, const fluid_real_t *in,
fluid_real_t *left_out, fluid_real_t *right_out)
{
int sample_index;
@ -456,7 +456,7 @@ void fluid_chorus_processmix(fluid_chorus_t *chorus, fluid_real_t *in,
}
/* Duplication of code ... (replaces sample data instead of mixing) */
void fluid_chorus_processreplace(fluid_chorus_t *chorus, fluid_real_t *in,
void fluid_chorus_processreplace(fluid_chorus_t *chorus, const fluid_real_t *in,
fluid_real_t *left_out, fluid_real_t *right_out)
{
int sample_index;

View file

@ -55,9 +55,9 @@ void fluid_chorus_reset(fluid_chorus_t *chorus);
void fluid_chorus_set(fluid_chorus_t *chorus, int set, int nr, fluid_real_t level,
fluid_real_t speed, fluid_real_t depth_ms, int type);
void fluid_chorus_processmix(fluid_chorus_t *chorus, fluid_real_t *in,
void fluid_chorus_processmix(fluid_chorus_t *chorus, const fluid_real_t *in,
fluid_real_t *left_out, fluid_real_t *right_out);
void fluid_chorus_processreplace(fluid_chorus_t *chorus, fluid_real_t *in,
void fluid_chorus_processreplace(fluid_chorus_t *chorus, const fluid_real_t *in,
fluid_real_t *left_out, fluid_real_t *right_out);

View file

@ -368,7 +368,7 @@ fluid_revmodel_reset(fluid_revmodel_t *rev)
}
void
fluid_revmodel_processreplace(fluid_revmodel_t *rev, fluid_real_t *in,
fluid_revmodel_processreplace(fluid_revmodel_t *rev, const fluid_real_t *in,
fluid_real_t *left_out, fluid_real_t *right_out)
{
int i, k = 0;
@ -410,7 +410,7 @@ fluid_revmodel_processreplace(fluid_revmodel_t *rev, fluid_real_t *in,
}
void
fluid_revmodel_processmix(fluid_revmodel_t *rev, fluid_real_t *in,
fluid_revmodel_processmix(fluid_revmodel_t *rev, const fluid_real_t *in,
fluid_real_t *left_out, fluid_real_t *right_out)
{
int i, k = 0;

View file

@ -61,10 +61,10 @@ typedef struct _fluid_revmodel_presets_t
fluid_revmodel_t *new_fluid_revmodel(fluid_real_t sample_rate);
void delete_fluid_revmodel(fluid_revmodel_t *rev);
void fluid_revmodel_processmix(fluid_revmodel_t *rev, fluid_real_t *in,
void fluid_revmodel_processmix(fluid_revmodel_t *rev, const fluid_real_t *in,
fluid_real_t *left_out, fluid_real_t *right_out);
void fluid_revmodel_processreplace(fluid_revmodel_t *rev, fluid_real_t *in,
void fluid_revmodel_processreplace(fluid_revmodel_t *rev, const fluid_real_t *in,
fluid_real_t *left_out, fluid_real_t *right_out);
void fluid_revmodel_reset(fluid_revmodel_t *rev);

View file

@ -130,8 +130,8 @@ fluid_rvoice_mixer_process_fx(fluid_rvoice_mixer_t *mixer, int current_blockcoun
const int fx_channels_per_unit = mixer->buffers.fx_buf_count / mixer->fx_units;
int i, f;
void (*reverb_process_func)(fluid_revmodel_t *rev, fluid_real_t *in, fluid_real_t *left_out, fluid_real_t *right_out);
void (*chorus_process_func)(fluid_chorus_t *chorus, fluid_real_t *in, fluid_real_t *left_out, fluid_real_t *right_out);
void (*reverb_process_func)(fluid_revmodel_t *rev, const fluid_real_t *in, fluid_real_t *left_out, fluid_real_t *right_out);
void (*chorus_process_func)(fluid_chorus_t *chorus, const fluid_real_t *in, fluid_real_t *left_out, fluid_real_t *right_out);
fluid_real_t *out_rev_l, *out_rev_r, *out_ch_l, *out_ch_r;
@ -375,7 +375,7 @@ get_dest_buf(fluid_rvoice_buffers_t *buffers, int index,
*/
static void
fluid_rvoice_buffers_mix(fluid_rvoice_buffers_t *buffers,
fluid_real_t *FLUID_RESTRICT dsp_buf,
const fluid_real_t *FLUID_RESTRICT dsp_buf,
int start_block, int sample_count,
fluid_real_t **dest_bufs, int dest_bufcount)
{

View file

@ -3939,7 +3939,7 @@ fluid_synth_write_s16(fluid_synth_t *synth, int len,
* @note Currently private to libfluidsynth.
*/
void
fluid_synth_dither_s16(int *dither_index, int len, float *lin, float *rin,
fluid_synth_dither_s16(int *dither_index, int len, const float *lin, const float *rin,
void *lout, int loff, int lincr,
void *rout, int roff, int rincr)
{

View file

@ -190,7 +190,7 @@ fluid_preset_t *fluid_synth_find_preset(fluid_synth_t *synth,
int prognum);
void fluid_synth_sfont_unref(fluid_synth_t *synth, fluid_sfont_t *sfont);
void fluid_synth_dither_s16(int *dither_index, int len, float *lin, float *rin,
void fluid_synth_dither_s16(int *dither_index, int len, const float *lin, const float *rin,
void *lout, int loff, int lincr,
void *rout, int roff, int rincr);