Skip to content

Commit b6590c4

Browse files
committed
rtcheck: Pre-allocate MIDI buffers
1 parent 8fca75d commit b6590c4

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ jobs:
130130
shell: bash
131131
run: |
132132
# Paths must be single quoted for bash not to escape the Windows backslash character \ used in absolute paths
133-
${{ env.APP_DIR }}/${{ matrix.test-binary }} --strictness-level 10 --rtcheck disabled --validate '${{ env.PLUGIN_CACHE_PATH }}/DSPModulePluginDemo_artefacts/Release/VST3/DSPModulePluginDemo.vst3'
134-
${{ env.APP_DIR }}/${{ matrix.test-binary }} --strictness-level 10 --rtcheck disabled --validate '${{ env.PLUGIN_CACHE_PATH }}/MultiOutSynthPlugin_artefacts/Release/VST3/MultiOutSynthPlugin.vst3'
133+
${{ env.APP_DIR }}/${{ matrix.test-binary }} --strictness-level 10 --rtcheck relaxed --validate '${{ env.PLUGIN_CACHE_PATH }}/DSPModulePluginDemo_artefacts/Release/VST3/DSPModulePluginDemo.vst3'
134+
${{ env.APP_DIR }}/${{ matrix.test-binary }} --strictness-level 10 --rtcheck relaxed --validate '${{ env.PLUGIN_CACHE_PATH }}/MultiOutSynthPlugin_artefacts/Release/VST3/MultiOutSynthPlugin.vst3'
135135
136136
- name: Validate JUCE Plugin examples (AU)
137137
shell: bash
@@ -143,7 +143,7 @@ jobs:
143143
mkdir -p ~/Library/Audio/Plug-Ins/Components/
144144
cp -R ${{ env.PLUGIN_CACHE_PATH }}/DSPModulePluginDemo_artefacts/Release/AU/DSPModulePluginDemo.component ~/Library/Audio/Plug-Ins/Components/
145145
killall -9 AudioComponentRegistrar # kick the AU registrar
146-
${{ env.APP_DIR }}/${{ matrix.test-binary }} --strictness-level 10 --rtcheck disabled --validate ~/Library/Audio/Plug-Ins/Components/DSPModulePluginDemo.component
146+
${{ env.APP_DIR }}/${{ matrix.test-binary }} --strictness-level 10 --rtcheck relaxed --validate ~/Library/Audio/Plug-Ins/Components/DSPModulePluginDemo.component
147147
148148
- name: Codesign (macOS)
149149
if: ${{ matrix.name == 'macOS' }}

Source/tests/BasicTests.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ struct EditorWhilstProcessingTest : public PluginTest
149149
const int numChannelsRequired = juce::jmax (instance.getTotalNumInputChannels(), instance.getTotalNumOutputChannels());
150150
juce::AudioBuffer<float> ab (numChannelsRequired, instance.getBlockSize());
151151
juce::MidiBuffer mb;
152+
mb.ensureSize (32);
152153

153154

154155
juce::WaitableEvent threadStartedEvent;
@@ -227,6 +228,7 @@ struct AudioProcessingTest : public PluginTest
227228
const int numChannelsRequired = juce::jmax (instance.getTotalNumInputChannels(), instance.getTotalNumOutputChannels());
228229
juce::AudioBuffer<float> ab (numChannelsRequired, bs);
229230
juce::MidiBuffer mb;
231+
mb.ensureSize (32);
230232

231233
// Add a random note on if the plugin is a synth
232234
const int noteChannel = r.nextInt ({ 1, 17 });
@@ -398,6 +400,7 @@ struct AutomationTest : public PluginTest
398400
const int numChannelsRequired = juce::jmax (instance.getTotalNumInputChannels(), instance.getTotalNumOutputChannels());
399401
juce::AudioBuffer<float> ab (numChannelsRequired, bs);
400402
juce::MidiBuffer mb;
403+
mb.ensureSize (32);
401404

402405
// Add a random note on if the plugin is a synth
403406
const int noteChannel = r.nextInt ({ 1, 17 });
@@ -663,6 +666,7 @@ struct ParameterThreadSafetyTest : public PluginTest
663666
const int numChannelsRequired = juce::jmax (instance.getTotalNumInputChannels(), instance.getTotalNumOutputChannels());
664667
juce::AudioBuffer<float> ab (numChannelsRequired, blockSize);
665668
juce::MidiBuffer mb;
669+
mb.ensureSize (32);
666670

667671
// Add a random note on if the plugin is a synth
668672
const int noteChannel = r.nextInt ({ 1, 17 });

Source/tests/ExtremeTests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ struct AllocationsInRealTimeThreadTest : public PluginTest
5050
const int numChannelsRequired = juce::jmax (instance.getTotalNumInputChannels(), instance.getTotalNumOutputChannels());
5151
juce::AudioBuffer<float> ab (numChannelsRequired, bs);
5252
juce::MidiBuffer mb;
53+
mb.ensureSize (32);
5354

5455
// Add a random note on if the plugin is a synth
5556
const int noteChannel = r.nextInt ({ 1, 17 });
@@ -131,6 +132,7 @@ struct LargerThanPreparedBlockSizeTest : public PluginTest
131132
const int numChannelsRequired = juce::jmax (instance.getTotalNumInputChannels(), instance.getTotalNumOutputChannels());
132133
juce::AudioBuffer<float> ab (numChannelsRequired, processingBlockSize);
133134
juce::MidiBuffer mb;
135+
mb.ensureSize (32);
134136

135137
for (int i = 0; i < 10; ++i)
136138
{

0 commit comments

Comments
 (0)