Skip to content

Commit

Permalink
Revert variable block size setting
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Dec 24, 2024
1 parent 29eb93b commit aa8ec6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Libraries/pure-data
Submodule pure-data updated 2 files
+1 −3 src/s_stuff.h
+1 −1 src/z_libpd.c
20 changes: 1 addition & 19 deletions Source/Dialogs/AudioSettingsPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,6 @@ class StandaloneAudioSettingsPanel final : public SettingsDialogPanel
setup.bufferSize = selected.getIntValue();
updateConfig();
}));

StringArray dspBufferSizeStrings = { "1", "2", "4", "8", "16", "32", "64", "128", "256" };
deviceConfigurationProperties.add(new CallbackComboProperty("DSP block size", dspBufferSizeStrings, String(libpd_blocksize()), [this](String const& selected) {
pd->suspendProcessing(true);
libpd_setblocksize(selected.getIntValue());
pd->prepareToPlay(pd->AudioProcessor::getSampleRate(), pd->AudioProcessor::getBlockSize());
pd->suspendProcessing(false);
}));
}

// This can possibly be empty if only one device type is available, and there is no device currently selected
Expand Down Expand Up @@ -476,16 +468,7 @@ class DAWAudioSettingsPanel final : public SettingsDialogPanel
latencyNumberBox = new PropertiesPanel::EditableComponent<int>("Latency (samples)", latencyValue);
tailLengthNumberBox = new PropertiesPanel::EditableComponent<float>("Tail length (seconds)", tailLengthValue);

StringArray const dspBufferSizeStrings = { "1", "2", "4", "8", "16", "32", "64", "128", "256" };
dspBlockSizeComboBox = new CallbackComboProperty("DSP block size", dspBufferSizeStrings, String(libpd_blocksize()), [this, pd = p](String const& selected) {
pd->suspendProcessing(true);
libpd_setblocksize(selected.getIntValue());
pd->performLatencyCompensationChange(getValue<int>(latencyValue));
pd->prepareToPlay(pd->AudioProcessor::getSampleRate(), pd->AudioProcessor::getBlockSize());
pd->suspendProcessing(false);
});

dawSettingsPanel.addSection("Audio", { dspBlockSizeComboBox, latencyNumberBox, tailLengthNumberBox });
dawSettingsPanel.addSection("Audio", { latencyNumberBox, tailLengthNumberBox });

addAndMakeVisible(dawSettingsPanel);

Expand Down Expand Up @@ -516,7 +499,6 @@ class DAWAudioSettingsPanel final : public SettingsDialogPanel

PropertiesPanel dawSettingsPanel;

CallbackComboProperty* dspBlockSizeComboBox;
PropertiesPanel::EditableComponent<int>* latencyNumberBox;
PropertiesPanel::EditableComponent<float>* tailLengthNumberBox;
};

0 comments on commit aa8ec6f

Please sign in to comment.