add a getter for fluid_preset_t::sfont

This commit is contained in:
derselbst 2018-06-04 10:49:58 +02:00
parent b0e22993cf
commit 995f22192d
2 changed files with 12 additions and 1 deletions

View file

@ -291,7 +291,7 @@ FLUIDSYNTH_API void* fluid_preset_get_data(fluid_preset_t* preset);
FLUIDSYNTH_API const char* fluid_preset_get_name(fluid_preset_t* preset);
FLUIDSYNTH_API int fluid_preset_get_banknum(fluid_preset_t* preset);
FLUIDSYNTH_API int fluid_preset_get_num(fluid_preset_t* preset);
FLUIDSYNTH_API fluid_sfont_t* fluid_preset_get_sfont(fluid_preset_t* preset);
FLUIDSYNTH_API fluid_sample_t* new_fluid_sample(void);
FLUIDSYNTH_API void delete_fluid_sample(fluid_sample_t* sample);

View file

@ -431,6 +431,17 @@ int fluid_preset_get_num(fluid_preset_t* preset)
return preset->get_num(preset);
}
/**
* Retrieves the presets parent SoundFont instance.
*
* @param preset The SoundFont preset instance.
* @return The parent SoundFont of \p preset.
*/
fluid_sfont_t* fluid_preset_get_sfont(fluid_preset_t* preset)
{
return preset->sfont;
}
/**
* Destroys a SoundFont preset instance created with new_fluid_preset().
*