Closed messmerd closed 11 months ago
I think this is really useful PR.
Maybe it needs a comment to say that the enum isn't allowed to have "holes" between min and max?
Maybe it needs a comment to say that the enum isn't allowed to have "holes" between min and max?
Maybe, although it should be totally clear. You can't have holes in a normal parameter, too.
Maybe I could add this wording?
_These named options should be available via value_totext() for each integer value within the parameter's [min, max] range.
Maybe I'd put the comment like this.
// Indicates that this parameter represents an enumerated value.
// If you set this flag, then you must set CLAP_PARAM_IS_STEPPED too.
// All values from min to max must have a non blank value_to_text().
Thank you :+1:
Oh this is great and I'll use it all the time!
See the proposal here: https://github.com/free-audio/clap/discussions/357
This PR adds a
CLAP_PARAM_IS_ENUM
flag toclap_param_info_flags
to denote an enum parameter.This flag tells the host when a parameter represents a set of named options mapped to integers, which can help the host decide how to present the parameter to users in its UI.