mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 21:31:18 +00:00
fluidmax: Fix compilation failure
...by adding new functions to reset reverb and chorus into the engine.
This commit is contained in:
parent
9fba1fe88a
commit
5f3568deee
6 changed files with 47 additions and 2 deletions
|
@ -761,7 +761,7 @@ fluidmax_reverb(t_object *o, Symbol *s, short ac, Atom *at)
|
||||||
if(ac == 0)
|
if(ac == 0)
|
||||||
{
|
{
|
||||||
fluid_synth_set_reverb_on(self->synth, 1);
|
fluid_synth_set_reverb_on(self->synth, 1);
|
||||||
fluid_revmodel_reset(self->synth->reverb);
|
fluid_synth_reset_reverb(self->synth);
|
||||||
self->reverb = 1;
|
self->reverb = 1;
|
||||||
}
|
}
|
||||||
else if(ftmax_is_number(at))
|
else if(ftmax_is_number(at))
|
||||||
|
@ -816,7 +816,7 @@ fluidmax_chorus(t_object *o, Symbol *s, short ac, Atom *at)
|
||||||
if(ac == 0)
|
if(ac == 0)
|
||||||
{
|
{
|
||||||
fluid_synth_set_chorus_on(self->synth, 1);
|
fluid_synth_set_chorus_on(self->synth, 1);
|
||||||
fluid_chorus_reset(self->synth->chorus);
|
fluid_synth_reset_chorus(self->synth);
|
||||||
self->chorus = 1;
|
self->chorus = 1;
|
||||||
}
|
}
|
||||||
else if(ftmax_is_number(at))
|
else if(ftmax_is_number(at))
|
||||||
|
|
|
@ -111,6 +111,8 @@ fluid_rvoice_event_dispatch(fluid_rvoice_event_t* event)
|
||||||
EVENTFUNC_I1(fluid_rvoice_mixer_set_chorus_enabled, fluid_rvoice_mixer_t*);
|
EVENTFUNC_I1(fluid_rvoice_mixer_set_chorus_enabled, fluid_rvoice_mixer_t*);
|
||||||
EVENTFUNC_I1(fluid_rvoice_mixer_set_mix_fx, fluid_rvoice_mixer_t*);
|
EVENTFUNC_I1(fluid_rvoice_mixer_set_mix_fx, fluid_rvoice_mixer_t*);
|
||||||
EVENTFUNC_0(fluid_rvoice_mixer_reset_fx, fluid_rvoice_mixer_t*);
|
EVENTFUNC_0(fluid_rvoice_mixer_reset_fx, fluid_rvoice_mixer_t*);
|
||||||
|
EVENTFUNC_0(fluid_rvoice_mixer_reset_reverb, fluid_rvoice_mixer_t*);
|
||||||
|
EVENTFUNC_0(fluid_rvoice_mixer_reset_chorus, fluid_rvoice_mixer_t*);
|
||||||
EVENTFUNC_IR(fluid_rvoice_mixer_set_threads, fluid_rvoice_mixer_t*);
|
EVENTFUNC_IR(fluid_rvoice_mixer_set_threads, fluid_rvoice_mixer_t*);
|
||||||
|
|
||||||
EVENTFUNC_ALL(fluid_rvoice_mixer_set_chorus_params, fluid_rvoice_mixer_t*);
|
EVENTFUNC_ALL(fluid_rvoice_mixer_set_chorus_params, fluid_rvoice_mixer_t*);
|
||||||
|
|
|
@ -683,6 +683,16 @@ void fluid_rvoice_mixer_reset_fx(fluid_rvoice_mixer_t* mixer)
|
||||||
fluid_chorus_reset(mixer->fx.chorus);
|
fluid_chorus_reset(mixer->fx.chorus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fluid_rvoice_mixer_reset_reverb(fluid_rvoice_mixer_t* mixer)
|
||||||
|
{
|
||||||
|
fluid_revmodel_reset(mixer->fx.reverb);
|
||||||
|
}
|
||||||
|
|
||||||
|
void fluid_rvoice_mixer_reset_chorus(fluid_rvoice_mixer_t* mixer)
|
||||||
|
{
|
||||||
|
fluid_chorus_reset(mixer->fx.chorus);
|
||||||
|
}
|
||||||
|
|
||||||
int fluid_rvoice_mixer_get_bufs(fluid_rvoice_mixer_t* mixer,
|
int fluid_rvoice_mixer_get_bufs(fluid_rvoice_mixer_t* mixer,
|
||||||
fluid_real_t*** left, fluid_real_t*** right)
|
fluid_real_t*** left, fluid_real_t*** right)
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,6 +59,8 @@ void fluid_rvoice_mixer_set_reverb_params(fluid_rvoice_mixer_t* mixer, int set,
|
||||||
double roomsize, double damping,
|
double roomsize, double damping,
|
||||||
double width, double level);
|
double width, double level);
|
||||||
void fluid_rvoice_mixer_reset_fx(fluid_rvoice_mixer_t* mixer);
|
void fluid_rvoice_mixer_reset_fx(fluid_rvoice_mixer_t* mixer);
|
||||||
|
void fluid_rvoice_mixer_reset_reverb(fluid_rvoice_mixer_t* mixer);
|
||||||
|
void fluid_rvoice_mixer_reset_chorus(fluid_rvoice_mixer_t* mixer);
|
||||||
|
|
||||||
void fluid_rvoice_mixer_set_threads(fluid_rvoice_mixer_t* mixer, int thread_count,
|
void fluid_rvoice_mixer_set_threads(fluid_rvoice_mixer_t* mixer, int thread_count,
|
||||||
int prio_level);
|
int prio_level);
|
||||||
|
|
|
@ -1535,6 +1535,35 @@ fluid_synth_all_sounds_off_LOCAL(fluid_synth_t* synth, int chan)
|
||||||
return FLUID_OK;
|
return FLUID_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset reverb engine
|
||||||
|
* @param synth FluidSynth instance
|
||||||
|
* @return FLUID_OK on success, FLUID_FAILED otherwise
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
fluid_synth_reset_reverb(fluid_synth_t* synth)
|
||||||
|
{
|
||||||
|
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
|
||||||
|
fluid_synth_api_enter(synth);
|
||||||
|
fluid_synth_update_mixer(synth, fluid_rvoice_mixer_reset_reverb, 0, 0.0f);
|
||||||
|
FLUID_API_RETURN(FLUID_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset chorus engine
|
||||||
|
* @param synth FluidSynth instance
|
||||||
|
* @return FLUID_OK on success, FLUID_FAILED otherwise
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
fluid_synth_reset_chorus(fluid_synth_t* synth)
|
||||||
|
{
|
||||||
|
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
|
||||||
|
fluid_synth_api_enter(synth);
|
||||||
|
fluid_synth_update_mixer(synth, fluid_rvoice_mixer_reset_chorus, 0, 0.0f);
|
||||||
|
FLUID_API_RETURN(FLUID_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send MIDI system reset command (big red 'panic' button), turns off notes and
|
* Send MIDI system reset command (big red 'panic' button), turns off notes and
|
||||||
* resets controllers.
|
* resets controllers.
|
||||||
|
|
|
@ -211,10 +211,12 @@ void fluid_synth_dither_s16(int *dither_index, int len, float* lin, float* rin,
|
||||||
void* lout, int loff, int lincr,
|
void* lout, int loff, int lincr,
|
||||||
void* rout, int roff, int rincr);
|
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, 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,
|
int fluid_synth_set_reverb_full(fluid_synth_t* synth, int set, double roomsize,
|
||||||
double damping, double width, double level);
|
double damping, double width, double level);
|
||||||
|
|
||||||
|
int fluid_synth_reset_chorus(fluid_synth_t* synth);
|
||||||
int fluid_synth_set_chorus_full(fluid_synth_t* synth, int set, int nr, double level,
|
int fluid_synth_set_chorus_full(fluid_synth_t* synth, int set, int nr, double level,
|
||||||
double speed, double depth_ms, int type);
|
double speed, double depth_ms, int type);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue