Update fluidsynth
Fix potential crashes in case fluid-synth runs into an OOM error, and address a const-cast compiler warning. Switch to track github repo (instead of sf.net git)
This commit is contained in:
parent
0650e0d3fd
commit
1dd4aab0b4
|
@ -372,10 +372,17 @@ fluid_midi_file_read_track(fluid_midi_file *mf, fluid_player_t *player, int num)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip remaining track data, if any */
|
/* Skip remaining track data, if any */
|
||||||
if (mf->trackpos < mf->tracklen)
|
if (mf->trackpos < mf->tracklen) {
|
||||||
fluid_midi_file_skip(mf, mf->tracklen - mf->trackpos);
|
if (fluid_midi_file_skip(mf, mf->tracklen - mf->trackpos) != FLUID_OK) {
|
||||||
|
delete_fluid_track(track);
|
||||||
|
return FLUID_FAILED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fluid_player_add_track(player, track);
|
if (fluid_player_add_track(player, track) != FLUID_OK) {
|
||||||
|
delete_fluid_track(track);
|
||||||
|
return FLUID_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
found_track = 0;
|
found_track = 0;
|
||||||
|
|
|
@ -443,7 +443,7 @@ fluid_settings_set(fluid_settings_t* settings, const char *name, void* value)
|
||||||
/** returns 1 if the value has been registered correctly, 0
|
/** returns 1 if the value has been registered correctly, 0
|
||||||
otherwise */
|
otherwise */
|
||||||
int
|
int
|
||||||
fluid_settings_register_str(fluid_settings_t* settings, char* name, char* def, int hints,
|
fluid_settings_register_str(fluid_settings_t* settings, const char* name, const char* def, int hints,
|
||||||
fluid_str_update_t fun, void* data)
|
fluid_str_update_t fun, void* data)
|
||||||
{
|
{
|
||||||
fluid_setting_node_t *node;
|
fluid_setting_node_t *node;
|
||||||
|
|
|
@ -37,7 +37,7 @@ typedef int (*fluid_int_update_t)(void* data, const char* name, int value);
|
||||||
|
|
||||||
/** returns 0 if the value has been registered correctly, non-zero
|
/** returns 0 if the value has been registered correctly, non-zero
|
||||||
otherwise */
|
otherwise */
|
||||||
int fluid_settings_register_str(fluid_settings_t* settings, char* name, char* def, int hints,
|
int fluid_settings_register_str(fluid_settings_t* settings, const char* name, const char* def, int hints,
|
||||||
fluid_str_update_t fun, void* data);
|
fluid_str_update_t fun, void* data);
|
||||||
|
|
||||||
/** returns 0 if the value has been registered correctly, non-zero
|
/** returns 0 if the value has been registered correctly, non-zero
|
||||||
|
|
|
@ -2544,6 +2544,12 @@ fluid_synth_process(fluid_synth_t* synth, int len, int nin, float** in,
|
||||||
int i;
|
int i;
|
||||||
left = FLUID_ARRAY(float*, nout/2);
|
left = FLUID_ARRAY(float*, nout/2);
|
||||||
right = FLUID_ARRAY(float*, nout/2);
|
right = FLUID_ARRAY(float*, nout/2);
|
||||||
|
if ((left == NULL) || (right == NULL)) {
|
||||||
|
FLUID_LOG(FLUID_ERR, "Out of memory.");
|
||||||
|
FLUID_FREE(left);
|
||||||
|
FLUID_FREE(right);
|
||||||
|
return FLUID_FAILED;
|
||||||
|
}
|
||||||
for(i=0; i<nout/2; i++) {
|
for(i=0; i<nout/2; i++) {
|
||||||
left[i] = out[2*i];
|
left[i] = out[2*i];
|
||||||
right[i] = out[2*i+1];
|
right[i] = out[2*i+1];
|
||||||
|
|
|
@ -20,7 +20,8 @@ echo $TMP
|
||||||
trap "rm -rf $TMP" EXIT
|
trap "rm -rf $TMP" EXIT
|
||||||
|
|
||||||
cd $TMP
|
cd $TMP
|
||||||
git clone git://git.code.sf.net/p/fluidsynth/code-git fs-git
|
#git clone git://git.code.sf.net/p/fluidsynth/code-git fs-git
|
||||||
|
git clone git://github.com/FluidSynth/fluidsynth.git fs-git
|
||||||
|
|
||||||
FSR=fs-git/fluidsynth/
|
FSR=fs-git/fluidsynth/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user