Move to JUCE 8 and bump dependencies#27
Conversation
| std::cout << indent << "Values: "; | ||
|
|
||
| if (auto valueStrings = param->getAllValueStrings(); !valueStrings.isEmpty()) { | ||
| auto valueStrings = param->getNumSteps() < 50 ? param->getAllValueStrings() : juce::StringArray(); |
There was a problem hiding this comment.
JUCE now has an assertion in getAllValueStrings which fires if you call it on a float parameter... This is a mildly awkward workaround to determine whether it's "worth" printing out all values (if there are 50 or more, then it won't).
There was a problem hiding this comment.
Can you add a comment that explains this? I always like to have non-obvious code like this explained because I'm sure people will wonder this in the future when going through the code!
There was a problem hiding this comment.
Hello, if you add a comment explaining this to the source code I can merge :)
There was a problem hiding this comment.
Hi there. I came across the same thing. JUCE actually has a couple of functions for this. Instead of setting the limit to 50, you can use if (param->isDiscrete()) and since VST3 doesn't give anything for getAllValueStrings(), you can steal and adapt getDiscreteValueStrings() from the AU wrapper in the JUCE codebase.
What would be the best way to submit a PR to show you this solution? Not sure if I can PR into Sudara's PR!
|
I think this PR has been resolved by merging my fork. @sudara may I close? |
I'm considering using
listParametersfor documentation / CI so got things up and running again on JUCE 8.A couple compatibility changes were needed.