mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-15 12:21:01 +00:00
parent
9a25e71b02
commit
1be0e5ae7c
1 changed files with 8 additions and 1 deletions
|
@ -750,6 +750,7 @@ fluid_jack_driver_process(jack_nframes_t nframes, void *arg)
|
|||
}
|
||||
else
|
||||
{
|
||||
int res;
|
||||
fluid_audio_func_t callback = (audio_driver->callback != NULL) ? audio_driver->callback : (fluid_audio_func_t) fluid_synth_process;
|
||||
|
||||
for(i = 0; i < audio_driver->num_output_ports; i++)
|
||||
|
@ -776,12 +777,18 @@ fluid_jack_driver_process(jack_nframes_t nframes, void *arg)
|
|||
FLUID_MEMSET(audio_driver->fx_bufs[k], 0, nframes * sizeof(float));
|
||||
}
|
||||
|
||||
return callback(audio_driver->data,
|
||||
res = callback(audio_driver->data,
|
||||
nframes,
|
||||
audio_driver->num_fx_ports * 2,
|
||||
audio_driver->fx_bufs,
|
||||
audio_driver->num_output_ports * 2,
|
||||
audio_driver->output_bufs);
|
||||
if(res != FLUID_OK)
|
||||
{
|
||||
const char *cb_func_name = (audio_driver->callback != NULL) ? "Custom audio callback function" : "fluid_synth_process()";
|
||||
FLUID_LOG(FLUID_PANIC, "%s returned an error. As a consequence, fluidsynth will now be removed from Jack's processing loop.", cb_func_name);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue