fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] fix


From: Antoine Schmitt
Subject: [fluid-dev] fix
Date: Thu, 25 Aug 2005 14:24:05 +0200


Sorry, this is not the best way to do it, but I have fixed a crash bug in the current version of fluidsynth. and I don't have CVS these days, so I am posting the fix here for Josh (?) to include it in some further release.. Thanks and sorry:

In the fluid_ramsfont.c file, the fluid_ramsfont_remove_izone function should be :

// start fix

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;
        }

        // 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;
}


// end fix



--

++ as





reply via email to

[Prev in Thread] Current Thread [Next in Thread]