mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-01-31 13:40:35 +00:00
Fixup previous commit so that it actually compiles, and change
sample rate to use fluid_real_t all the way through.
This commit is contained in:
parent
f84a9b9885
commit
e25feb62d0
7 changed files with 18 additions and 17 deletions
|
@ -71,8 +71,6 @@ struct _fluid_allpass {
|
|||
int bufidx;
|
||||
};
|
||||
|
||||
void fluid_allpass_setbuffer(fluid_allpass* allpass, fluid_real_t *buf, int size);
|
||||
void fluid_allpass_release(fluid_comb* comb);
|
||||
void fluid_allpass_init(fluid_allpass* allpass);
|
||||
void fluid_allpass_setfeedback(fluid_allpass* allpass, fluid_real_t val);
|
||||
fluid_real_t fluid_allpass_getfeedback(fluid_allpass* allpass);
|
||||
|
@ -303,10 +301,10 @@ struct _fluid_revmodel_t {
|
|||
|
||||
static void fluid_revmodel_update(fluid_revmodel_t* rev);
|
||||
static void fluid_revmodel_init(fluid_revmodel_t* rev);
|
||||
void fluid_set_revmodel_buffers(fluid_revmodel_t* rev, int sample_rate);
|
||||
void fluid_set_revmodel_buffers(fluid_revmodel_t* rev, fluid_real_t sample_rate);
|
||||
|
||||
fluid_revmodel_t*
|
||||
new_fluid_revmodel(int sample_rate)
|
||||
new_fluid_revmodel(fluid_real_t sample_rate)
|
||||
{
|
||||
fluid_revmodel_t* rev;
|
||||
rev = FLUID_NEW(fluid_revmodel_t);
|
||||
|
@ -349,7 +347,7 @@ delete_fluid_revmodel(fluid_revmodel_t* rev)
|
|||
}
|
||||
|
||||
void
|
||||
fluid_set_revmodel_buffers(fluid_revmodel_t* rev, int sample_rate) {
|
||||
fluid_set_revmodel_buffers(fluid_revmodel_t* rev, fluid_real_t sample_rate) {
|
||||
|
||||
float srfactor = sample_rate/44100.0f;
|
||||
|
||||
|
@ -532,7 +530,7 @@ fluid_revmodel_set(fluid_revmodel_t* rev, int set, float roomsize,
|
|||
}
|
||||
|
||||
void
|
||||
fluid_revmodel_samplerate_change(fluid_revmodel_t* rev, int sample_rate) {
|
||||
fluid_revmodel_samplerate_change(fluid_revmodel_t* rev, fluid_real_t sample_rate) {
|
||||
int i;
|
||||
for (i = 0; i < numcombs;i++) {
|
||||
fluid_comb_release(&rev->combL[i]);
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef struct _fluid_revmodel_presets_t {
|
|||
/*
|
||||
* reverb
|
||||
*/
|
||||
fluid_revmodel_t* new_fluid_revmodel(int sample_rate);
|
||||
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,
|
||||
|
@ -68,6 +68,6 @@ void fluid_revmodel_reset(fluid_revmodel_t* rev);
|
|||
void fluid_revmodel_set(fluid_revmodel_t* rev, int set, float roomsize,
|
||||
float damping, float width, float level);
|
||||
|
||||
void fluid_revmodel_samplerate_change(fluid_revmodel_t* rev, int sample_rate);
|
||||
void fluid_revmodel_samplerate_change(fluid_revmodel_t* rev, fluid_real_t sample_rate);
|
||||
|
||||
#endif /* _FLUID_REV_H */
|
||||
|
|
|
@ -219,8 +219,9 @@ finished_voice_callback(void* userdata, fluid_rvoice_t* rvoice)
|
|||
fluid_ringbuffer_next_inptr(eventhandler->finished_voices, 1);
|
||||
}
|
||||
|
||||
fluid_rvoice_eventhandler_t* new_fluid_rvoice_eventhandler(
|
||||
int is_threadsafe, int queuesize, int finished_voices_size, int bufs, int fx_bufs, int sample_rate)
|
||||
fluid_rvoice_eventhandler_t*
|
||||
new_fluid_rvoice_eventhandler(int is_threadsafe, int queuesize,
|
||||
int finished_voices_size, int bufs, int fx_bufs, fluid_real_t sample_rate)
|
||||
{
|
||||
fluid_rvoice_eventhandler_t* eventhandler = FLUID_NEW(fluid_rvoice_eventhandler_t);
|
||||
if (eventhandler == NULL) {
|
||||
|
|
|
@ -56,7 +56,8 @@ struct _fluid_rvoice_eventhandler_t {
|
|||
};
|
||||
|
||||
fluid_rvoice_eventhandler_t* new_fluid_rvoice_eventhandler(
|
||||
int is_threadsafe, int queuesize, int finished_voices_size, int bufs, int fx_bufs);
|
||||
int is_threadsafe, int queuesize, int finished_voices_size, int bufs,
|
||||
int fx_bufs, fluid_real_t sample_rate);
|
||||
|
||||
void delete_fluid_rvoice_eventhandler(fluid_rvoice_eventhandler_t*);
|
||||
|
||||
|
|
|
@ -531,7 +531,7 @@ fluid_rvoice_mixer_set_samplerate(fluid_rvoice_mixer_t* mixer, fluid_real_t samp
|
|||
* @param fx_buf_count number of stereo effect buffers
|
||||
*/
|
||||
fluid_rvoice_mixer_t*
|
||||
new_fluid_rvoice_mixer(int buf_count, int fx_buf_count, int sample_rate)
|
||||
new_fluid_rvoice_mixer(int buf_count, int fx_buf_count, fluid_real_t sample_rate)
|
||||
{
|
||||
fluid_rvoice_mixer_t* mixer = FLUID_NEW(fluid_rvoice_mixer_t);
|
||||
if (mixer == NULL) {
|
||||
|
|
|
@ -41,7 +41,8 @@ int fluid_rvoice_mixer_render(fluid_rvoice_mixer_t* mixer, int blockcount);
|
|||
int fluid_rvoice_mixer_get_bufs(fluid_rvoice_mixer_t* mixer,
|
||||
fluid_real_t*** left, fluid_real_t*** right);
|
||||
|
||||
fluid_rvoice_mixer_t* new_fluid_rvoice_mixer(int buf_count, int fx_buf_count, int sample_rate);
|
||||
fluid_rvoice_mixer_t* new_fluid_rvoice_mixer(int buf_count, int fx_buf_count,
|
||||
fluid_real_t sample_rate);
|
||||
|
||||
void delete_fluid_rvoice_mixer(fluid_rvoice_mixer_t*);
|
||||
|
||||
|
|
|
@ -663,9 +663,9 @@ new_fluid_synth(fluid_settings_t *settings)
|
|||
/* Allocate event queue for rvoice mixer */
|
||||
fluid_settings_getint(settings, "synth.parallel-render", &i);
|
||||
/* In an overflow situation, a new voice takes about 50 spaces in the queue! */
|
||||
synth->eventhandler = new_fluid_rvoice_eventhandler(i, synth->polyphony*64,
|
||||
synth->polyphony,
|
||||
nbuf, synth->effects_channels, (int)synth->sample_rate);
|
||||
synth->eventhandler = new_fluid_rvoice_eventhandler(i, synth->polyphony*64,
|
||||
synth->polyphony, nbuf, synth->effects_channels, synth->sample_rate);
|
||||
|
||||
if (synth->eventhandler == NULL)
|
||||
goto error_recovery;
|
||||
|
||||
|
@ -2229,7 +2229,7 @@ fluid_synth_set_polyphony(fluid_synth_t* synth, int polyphony)
|
|||
fluid_return_val_if_fail (polyphony >= 1 && polyphony <= 65535, FLUID_FAILED);
|
||||
fluid_synth_api_enter(synth);
|
||||
|
||||
fluid_synth_update_polyphony_LOCAL(synth, polyphony);
|
||||
result = fluid_synth_update_polyphony_LOCAL(synth, polyphony);
|
||||
|
||||
FLUID_API_RETURN(result);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue