diff --git a/doc/fluidsynth-v11-devdoc.txt b/doc/fluidsynth-v11-devdoc.txt index 23d3bcfd..94c779d7 100644 --- a/doc/fluidsynth-v11-devdoc.txt +++ b/doc/fluidsynth-v11-devdoc.txt @@ -85,7 +85,7 @@ Changes in FluidSynth 2.0.0 concerning developers: - remove fluid_synth_set_gen2(), fluid_synth_set_gen() now behaves as fluid_synth_set_gen2() - remove struct fluid_mod_t from public API, use the getters and setters of mod.h instead - remove struct _fluid_gen_t, fluid_gen_set_default_values() and enum fluid_gen_flags from public API -- remove macro fluid_sfont_get_id() from public API +- remove macros fluid_sfont_get_id() and fluid_sample_refcount() from public API

- all public \c fluid_settings_* functions that return an integer which is not meant to be interpreted as bool consistently return either FLUID_OK or FLUID_FAILED - all public delete_* functions return void and are safe when called with NULL diff --git a/include/fluidsynth/sfont.h b/include/fluidsynth/sfont.h index 49b64b0f..86a90721 100644 --- a/include/fluidsynth/sfont.h +++ b/include/fluidsynth/sfont.h @@ -290,7 +290,7 @@ struct _fluid_sample_t int amplitude_that_reaches_noise_floor_is_valid; /**< Indicates if \a amplitude_that_reaches_noise_floor is valid (TRUE), set to FALSE initially to calculate. */ double amplitude_that_reaches_noise_floor; /**< The amplitude at which the sample's loop will be below the noise floor. For voice off optimization, calculated automatically. */ - unsigned int refcount; /**< Count of voices using this sample (use #fluid_sample_refcount to access this field) */ + unsigned int refcount; /**< Count of voices using this sample */ /** * Implement this function to receive notification when sample is no longer used. @@ -304,7 +304,6 @@ struct _fluid_sample_t }; -#define fluid_sample_refcount(_sample) ((_sample)->refcount) /**< Get the reference count of a sample. Should only be called from within synthesis context (noteon method for example) */ #define FLUID_SAMPLETYPE_MONO 1 /**< Flag for #fluid_sample_t \a sampletype field for mono samples */ diff --git a/src/sfloader/fluid_defsfont.c b/src/sfloader/fluid_defsfont.c index 148a7817..e76c1217 100644 --- a/src/sfloader/fluid_defsfont.c +++ b/src/sfloader/fluid_defsfont.c @@ -552,7 +552,7 @@ int delete_fluid_defsfont(fluid_defsfont_t* sfont) /* Check that no samples are currently used */ for (list = sfont->sample; list; list = fluid_list_next(list)) { sample = (fluid_sample_t*) fluid_list_get(list); - if (fluid_sample_refcount(sample) != 0) { + if (sample->refcount != 0) { return FLUID_FAILED; } } diff --git a/src/sfloader/fluid_ramsfont.c b/src/sfloader/fluid_ramsfont.c index d75eb545..a0da0360 100644 --- a/src/sfloader/fluid_ramsfont.c +++ b/src/sfloader/fluid_ramsfont.c @@ -256,7 +256,7 @@ delete_fluid_ramsfont (fluid_ramsfont_t* sfont) /* Check that no samples are currently used */ for (list = sfont->sample; list; list = fluid_list_next(list)) { fluid_sample_t* sam = (fluid_sample_t*) fluid_list_get(list); - if (fluid_sample_refcount(sam) != 0) { + if (sam->refcount != 0) { return -1; } }