Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLI11
Submodule CLI11 updated 274 files
2 changes: 1 addition & 1 deletion JUCE
Submodule JUCE updated 3656 files
4 changes: 2 additions & 2 deletions Source/ListParametersCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ void ListParametersCommand::execute() {

// print the parameter's values
std::cout << indent << "Values: ";

if (auto valueStrings = param->getAllValueStrings(); !valueStrings.isEmpty()) {
auto valueStrings = param->getNumSteps() < 50 ? param->getAllValueStrings() : juce::StringArray();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

if (!valueStrings.isEmpty()) {
// list all discrete values
for (int i = 0; i < valueStrings.size(); i++) {
std::cout << valueStrings[i];
Expand Down
2 changes: 1 addition & 1 deletion Source/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ std::unique_ptr<juce::AudioPluginInstance>
PluginUtils::createPluginInstance(const juce::String& pluginPath, double initialSampleRate,
int initialBlockSize) {
juce::AudioPluginFormatManager audioPluginFormatManager;
audioPluginFormatManager.addDefaultFormats();
juce::addDefaultFormatsToManager (audioPluginFormatManager);

// parse the plugin path into a PluginDescription instance
juce::PluginDescription pluginDescription;
Expand Down
2 changes: 1 addition & 1 deletion json
Submodule json updated 921 files