Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fluid_preset accessor functions should be made public #391

Closed
mawe42 opened this issue May 31, 2018 · 3 comments
Closed

fluid_preset accessor functions should be made public #391

mawe42 opened this issue May 31, 2018 · 3 comments
Milestone

Comments

@mawe42
Copy link
Member

mawe42 commented May 31, 2018

In current master (and 2.0 beta1), fluid_preset is an opaque type, meant to be accessed via the fluid_preset_get_* accessor functions. However, those accessor functions are not exposed via the API but only defined in sfloader/fluid_sfont.h

As we expose iteration functions to retrieve presets from a soundfont, we should also expose accessors to get information about those presets.

fluidsynth-dssi is an example of a downstream user of this API.

@mawe42
Copy link
Member Author

mawe42 commented May 31, 2018

As we expose iteration functions to retrieve presets from a Soundfont, we should also expose accessors to get information about those presets.

Hm, we don't expose the iteration functions, fluid_sfont_iteration_start and fluid_sfont_iteration_next are not part of the public API.

I can't remember the intention behind this API change. But as there is at least one downstream user, we should probably expose both iteration and preset accessors. I think fluidsynth-dssi's use case is quite valid: reading the preset names, bank and program numbers to display them in a list.

See https://github.com/schnitzeltony/fluidsynth-dssi/blob/030273ab3b9c167a5b237bdabb8c59f93f1e68f7/src/fluidsynth-dssi.c#L211

@loki666
Copy link
Contributor

loki666 commented May 31, 2018

I basically I have the same need, and I also had to go through fluid_sfont.h (not pretty)

@mawe42
Copy link
Member Author

mawe42 commented May 31, 2018

QSynth as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants