Applied RAM sfont crash bug patch from Antoine Schmitt.

This commit is contained in:
Element Green 2005-09-05 02:45:34 +00:00
parent 029847c82a
commit 063038b73d
4 changed files with 23 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2005-09-04 Josh Green <jgreen@users.sourceforge.net>
* src/fluid_ramsfont.c (fluid_ramsfont_remove_izone): Applied crash bug
fix from Antoine Schmitt.
2005-07-05 Josh Green <jgreen@users.sourceforge.net>
* src/fluidsynth_priv.h: FLUID_ALIGN16BYTE is broken on AMD64 so now

View File

@ -2,7 +2,7 @@
SUBDIRS = macbuild sf2 winbuild src doc include
EXTRA_DIST = TODO acinclude.m4 autogen.sh fluidsynth.pc.in \
fluidsynth.spec.in fluidsynth.spec fluidsynth.prj
fluidsynth.spec.in fluidsynth.spec fluidsynth.prj README-OSX
DISTCLEANFILES = fluidsynth.pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = fluidsynth.pc

View File

@ -1,3 +1,5 @@
- Build win32 package
- Investigate why MIDI rendering causes burst of notes at start
Bugs and incomplete code
------------------------
@ -42,8 +44,7 @@ Binaries
Requests
--------
- Add compatibility for EMU8k volume attenuation parameter which
doesn't follow SoundFont specifications
- Improve non-realtime rendering of MIDI to WAV files
- Remove dependency of settings on audio driver and other (see
fluid_settings_init())
- Add "unselect" command to shell to set a MIDI channel to not sound.

View File

@ -320,11 +320,22 @@ int fluid_ramsfont_add_izone(fluid_ramsfont_t* sfont,
int fluid_ramsfont_remove_izone(fluid_ramsfont_t* sfont,
unsigned int bank, unsigned int num, fluid_sample_t* sample) {
int err;
fluid_rampreset_t* preset = fluid_ramsfont_get_preset(sfont, bank, num);
if (preset == NULL) {
return FLUID_FAILED;
}
return fluid_rampreset_remove_izone(preset, sample);
// Fixed a crash bug : remove the sample from the sfont list after
// removing the izone (aschmitt august 2005)
err = fluid_rampreset_remove_izone(preset, sample);
if (err != FLUID_OK)
return err;
// now we must remove the sample from sfont->sample
sfont->sample = fluid_list_remove(sfont->sample, sample);
return FLUID_OK;
}