Skip to content

Commit 35be647

Browse files
committed
Fixed Vanilla test
1 parent 3fa8201 commit 35be647

File tree

4 files changed

+101
-8
lines changed

4 files changed

+101
-8
lines changed

.clang-format

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
BasedOnStyle: WebKit
3+
AccessModifierOffset: '-4'
4+
AlignAfterOpenBracket: Align
5+
AlignConsecutiveMacros: 'true'
6+
AlignConsecutiveAssignments: 'true'
7+
AlignConsecutiveDeclarations: 'true'
8+
AlignEscapedNewlines: Right
9+
AlignOperands: 'true'
10+
AlignTrailingComments: 'true'
11+
AllowAllConstructorInitializersOnNextLine: 'true'
12+
AllowAllParametersOfDeclarationOnNextLine: 'false'
13+
AllowShortBlocksOnASingleLine: 'false'
14+
AllowShortCaseLabelsOnASingleLine: 'true'
15+
AllowShortFunctionsOnASingleLine: Inline
16+
AllowShortIfStatementsOnASingleLine: Never
17+
AllowShortLoopsOnASingleLine: 'false'
18+
AlwaysBreakAfterDefinitionReturnType: None
19+
AlwaysBreakAfterReturnType: None
20+
AlwaysBreakBeforeMultilineStrings: 'false'
21+
AlwaysBreakTemplateDeclarations: 'Yes'
22+
BinPackArguments: 'true'
23+
BinPackParameters: 'true'
24+
BreakAfterJavaFieldAnnotations: 'false'
25+
BreakBeforeBinaryOperators: NonAssignment
26+
BreakBeforeBraces: Allman
27+
BreakBeforeTernaryOperators: 'false'
28+
BreakConstructorInitializers: BeforeColon
29+
BreakInheritanceList: BeforeComma
30+
BreakStringLiterals: 'true'
31+
ColumnLimit: '160'
32+
CompactNamespaces: 'true'
33+
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
34+
ConstructorInitializerIndentWidth: '2'
35+
ContinuationIndentWidth: '2'
36+
Cpp11BracedListStyle: 'false'
37+
DerivePointerAlignment: 'false'
38+
DisableFormat: 'false'
39+
ExperimentalAutoDetectBinPacking: 'false'
40+
FixNamespaceComments: 'true'
41+
IncludeBlocks: Regroup
42+
IndentCaseLabels: 'true'
43+
IndentPPDirectives: BeforeHash
44+
IndentWidth: '4'
45+
IndentWrappedFunctionNames: 'true'
46+
KeepEmptyLinesAtTheStartOfBlocks: 'true'
47+
Language: Cpp
48+
MaxEmptyLinesToKeep: '2'
49+
NamespaceIndentation: None
50+
PenaltyBreakBeforeFirstCallParameter: '100'
51+
PenaltyBreakComment: '100'
52+
PenaltyBreakFirstLessLess: '0'
53+
PenaltyBreakString: '100'
54+
PenaltyExcessCharacter: '1'
55+
PenaltyReturnTypeOnItsOwnLine: '20'
56+
PointerAlignment: Left
57+
ReflowComments: 'false'
58+
SortIncludes: 'true'
59+
SortUsingDeclarations: 'true'
60+
SpaceAfterCStyleCast: 'true'
61+
SpaceAfterLogicalNot: 'false'
62+
SpaceAfterTemplateKeyword: 'false'
63+
SpaceBeforeAssignmentOperators: 'true'
64+
SpaceBeforeCpp11BracedList: 'true'
65+
SpaceBeforeCtorInitializerColon: 'true'
66+
SpaceBeforeInheritanceColon: 'true'
67+
SpaceBeforeParens: NonEmptyParentheses
68+
SpaceBeforeRangeBasedForLoopColon: 'false'
69+
SpaceInEmptyParentheses: 'false'
70+
SpacesBeforeTrailingComments: '2'
71+
SpacesInAngles: 'false'
72+
SpacesInCStyleCastParentheses: 'false'
73+
SpacesInContainerLiterals: 'false'
74+
SpacesInSquareBrackets: 'false'
75+
Standard: Auto
76+
TabWidth: '4'
77+
UseTab: Never
78+
79+
...

Examples/Vanilla/Source/PluginProcessor.cpp

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11

22
#include "PluginProcessor.h"
33

4+
VanillaAudioProcessor::VanillaAudioProcessor()
5+
: foleys::MagicProcessor (
6+
juce::AudioProcessor::BusesProperties().withInput ("Intput", juce::AudioChannelSet::stereo(), true).withOutput ("Output", juce::AudioChannelSet::stereo(), true))
7+
{
8+
}
49

10+
void VanillaAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer, juce::MidiBuffer&)
11+
{
12+
for (int channel = getTotalNumInputChannels(); channel < getTotalNumOutputChannels(); ++channel)
13+
buffer.clear (channel, 0, buffer.getNumChannels());
514

6-
VanillaAudioProcessor::VanillaAudioProcessor() : foleys::MagicProcessor(juce::AudioProcessor::BusesProperties()
7-
.withOutput ("Output", juce::AudioChannelSet::stereo(), true))
8-
{}
15+
buffer.clear();
16+
}
917

18+
bool VanillaAudioProcessor::isBusesLayoutSupported (const juce::AudioProcessor::BusesLayout& layout) const
19+
{
20+
return (layout.getMainInputChannelSet() == layout.getMainOutputChannelSet());
21+
}
1022

1123
//==============================================================================
1224
// This creates new instances of the plugin..

Examples/Vanilla/Source/PluginProcessor.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ class VanillaAudioProcessor : public foleys::MagicProcessor
88
public:
99
VanillaAudioProcessor();
1010

11-
void prepareToPlay ([[maybe_unused]]double sampleRate, [[maybe_unused]]int expectedNumSamples) override {}
12-
void processBlock (juce::AudioBuffer<float>&, juce::MidiBuffer&) override {}
13-
void releaseResources() override {}
11+
void prepareToPlay ([[maybe_unused]] double sampleRate, [[maybe_unused]] int expectedNumSamples) override { }
12+
void processBlock (juce::AudioBuffer<float>&, juce::MidiBuffer&) override;
13+
void releaseResources() override { }
1414

15-
double getTailLengthSeconds() const override { return 0.0; }
15+
bool isBusesLayoutSupported (const juce::AudioProcessor::BusesLayout& layout) const override;
1616

1717
private:
18-
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(VanillaAudioProcessor)
18+
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VanillaAudioProcessor)
1919
};

modules/foleys_gui_magic/General/foleys_MagicProcessor.h

+2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ class MagicProcessor : public juce::AudioProcessor
106106
void getStateInformation (juce::MemoryBlock& destData) override;
107107
void setStateInformation (const void* data, int sizeInBytes) override;
108108

109+
double getTailLengthSeconds() const override { return 0.0; }
110+
109111
//==============================================================================
110112
int getNumPrograms() override { return 1; }
111113
int getCurrentProgram() override { return 0; }

0 commit comments

Comments
 (0)