-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPluginProcessor.cpp
More file actions
34 lines (27 loc) · 1.02 KB
/
PluginProcessor.cpp
File metadata and controls
34 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: BSD-3-Clause
#include "PluginProcessor.h"
#include "PluginEditor.h"
juce::AudioProcessorEditor* AudioPluginAudioProcessor::createEditor()
{
return new PluginEditor(*this);
}
void AudioPluginAudioProcessor::processBlock(juce::AudioBuffer<float>& buffer,
juce::MidiBuffer& midiMessages)
{
juce::ignoreUnused(midiMessages);
juce::ScopedNoDenormals noDenormals;
auto totalNumInputChannels = getTotalNumInputChannels();
auto totalNumOutputChannels = getTotalNumOutputChannels();
for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
buffer.clear(i, 0, buffer.getNumSamples());
for (int channel = 0; channel < totalNumInputChannels; ++channel)
{
auto* channelData = buffer.getWritePointer (channel);
juce::ignoreUnused(channelData); // No-op
}
}
juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()
{
return new AudioPluginAudioProcessor;
}