Reverted change to unsigned type on fluid_synth_set_reverb_preset(), used fluid_return_val_if_fail() for consistency.

This commit is contained in:
carlo-bramini 2017-10-21 16:49:07 +02:00
parent ae041fdcec
commit b15f6c4b2a
2 changed files with 6 additions and 4 deletions

View file

@ -3895,10 +3895,12 @@ fluid_synth_set_reverb_on(fluid_synth_t* synth, int on)
* @note Currently private to libfluidsynth.
*/
int
fluid_synth_set_reverb_preset(fluid_synth_t* synth, unsigned int num)
fluid_synth_set_reverb_preset(fluid_synth_t* synth, int num)
{
if (num >= FLUID_N_ELEMENTS(revmodel_preset))
return FLUID_FAILED;
fluid_return_val_if_fail (
num < 0 || num >= (int)FLUID_N_ELEMENTS(revmodel_preset),
FLUID_FAILED
);
fluid_synth_set_reverb (synth, revmodel_preset[num].roomsize,
revmodel_preset[num].damp, revmodel_preset[num].width,

View file

@ -191,7 +191,7 @@ void fluid_synth_dither_s16(int *dither_index, int len, float* lin, float* rin,
void* rout, int roff, int rincr);
int fluid_synth_reset_reverb(fluid_synth_t* synth);
int fluid_synth_set_reverb_preset(fluid_synth_t* synth, unsigned int num);
int fluid_synth_set_reverb_preset(fluid_synth_t* synth, int num);
int fluid_synth_set_reverb_full(fluid_synth_t* synth, int set, double roomsize,
double damping, double width, double level);