Skip to content

Commit 412c776

Browse files
committed
Add placeholder processor
1 parent fef1666 commit 412c776

5 files changed

Lines changed: 125 additions & 8 deletions

File tree

Builds/VisualStudio2013/open-ephys.sln

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
1-
Microsoft Visual Studio Solution File, Format Version 11.00
1+
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 2013
3-
Project("{5A05F353-1D63-394C-DFB0-981BB2309002}") = "open-ephys", "open-ephys.vcxproj", "{9C924D66-7DEC-1AEF-B375-DB8666BFB909}"
3+
VisualStudioVersion = 12.0.31101.0
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "open-ephys", "open-ephys.vcxproj", "{9C924D66-7DEC-1AEF-B375-DB8666BFB909}"
46
EndProject
57
Global
68
GlobalSection(SolutionConfigurationPlatforms) = preSolution
79
Debug|Win32 = Debug|Win32
8-
Release|Win32 = Release|Win32
10+
Debug|x64 = Debug|x64
11+
Debug64|Win32 = Debug64|Win32
912
Debug64|x64 = Debug64|x64
13+
Release|Win32 = Release|Win32
14+
Release|x64 = Release|x64
15+
Release64|Win32 = Release64|Win32
1016
Release64|x64 = Release64|x64
1117
EndGlobalSection
1218
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1319
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug|Win32.ActiveCfg = Debug|Win32
1420
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug|Win32.Build.0 = Debug|Win32
15-
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.ActiveCfg = Release|Win32
16-
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.Build.0 = Release|Win32
21+
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug|x64.ActiveCfg = Debug|Win32
22+
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|Win32.ActiveCfg = Debug64|x64
1723
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|x64.ActiveCfg = Debug64|x64
1824
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|x64.Build.0 = Debug64|x64
25+
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.ActiveCfg = Release|Win32
26+
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.Build.0 = Release|Win32
27+
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|x64.ActiveCfg = Release|Win32
28+
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release64|Win32.ActiveCfg = Release64|x64
1929
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release64|x64.ActiveCfg = Release64|x64
2030
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release64|x64.Build.0 = Release64|x64
2131
EndGlobalSection

Source/Processors/PlaceholderProcessor/PlaceholderProcessor.cpp

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,45 @@
2222
*/
2323

2424
#include "PlaceholderProcessor.h"
25+
#include "PlaceholderProcessorEditor.h"
26+
27+
PlaceholderProcessor::PlaceholderProcessor(String pName, String lName, int lVer, bool pSource, bool pSink) :
28+
GenericProcessor(pName), processorName(pName), libName(lName), libVersion(lVer),
29+
processorSource(pSource), processorSink(pSink)
30+
{
31+
32+
}
33+
34+
PlaceholderProcessor::~PlaceholderProcessor()
35+
{
36+
37+
}
38+
39+
bool PlaceholderProcessor::hasEditor() const
40+
{
41+
return true;
42+
}
43+
44+
AudioProcessorEditor* PlaceholderProcessor::createEditor()
45+
{
46+
return new PlaceholderProcessorEditor(this, processorName, libName, libVersion);
47+
}
48+
49+
void PlaceholderProcessor::process(AudioSampleBuffer& continuousBuffer, MidiBuffer& eventBuffer)
50+
{
51+
52+
}
53+
54+
bool PlaceholderProcessor::isSource()
55+
{
56+
return processorSource;
57+
}
58+
bool PlaceholderProcessor::isSink()
59+
{
60+
return processorSink;
61+
}
62+
63+
bool PlaceholderProcessor::enable()
64+
{
65+
return false; //This processor never allows processing
66+
}

Source/Processors/PlaceholderProcessor/PlaceholderProcessor.h

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,31 @@
2424
#ifndef PLACEHOLDERPROCESSOR_H_INCLUDED
2525
#define PLACEHOLDERPROCESSOR_H_INCLUDED
2626

27-
27+
#include "../../../JuceLibraryCode/JuceHeader.h"
28+
#include "../GenericProcessor/GenericProcessor.h"
29+
30+
class PlaceholderProcessor : public GenericProcessor
31+
{
32+
public:
33+
PlaceholderProcessor(String pName, String lName, int lVer, bool pSource, bool pSink);
34+
~PlaceholderProcessor();
35+
bool hasEditor() const override;
36+
AudioProcessorEditor* createEditor() override;
37+
38+
void process(AudioSampleBuffer& continuousBuffer,
39+
MidiBuffer& eventBuffer) override;
40+
bool isSource() override;
41+
bool isSink() override;
42+
bool enable() override;
43+
private:
44+
const String processorName;
45+
const String libName;
46+
const int libVersion;
47+
const bool processorSource;
48+
const bool processorSink;
49+
50+
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PlaceholderProcessor);
51+
};
2852

2953

3054

Source/Processors/PlaceholderProcessor/PlaceholderProcessorEditor.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,27 @@
2222
*/
2323

2424
#include "PlaceholderProcessorEditor.h"
25+
26+
PlaceholderProcessorEditor::PlaceholderProcessorEditor(GenericProcessor* parentNode, String pName, String lName, int lVer)
27+
: GenericEditor(parentNode, true), processorName(pName), libName(lName), libVersion(lVer)
28+
{
29+
notfoundLabel = new Label("Not found", "Plugin not found");
30+
notfoundLabel->setBounds(30, 30, 100, 20);
31+
addAndMakeVisible(notfoundLabel);
32+
33+
libLabel = new Label("Plugin", libName + " ver. " + String(libVersion));
34+
libLabel->setBounds(30, 70, 100, 20);
35+
addAndMakeVisible(libLabel);
36+
37+
nameLabel = new Label("Processor", "Missing processor: " + processorName);
38+
libLabel->setBounds(30, 110, 100, 20);
39+
addAndMakeVisible(nameLabel);
40+
41+
desiredWidth = 150;
42+
setEnabledState(false);
43+
}
44+
45+
PlaceholderProcessorEditor::~PlaceholderProcessorEditor()
46+
{
47+
48+
}

Source/Processors/PlaceholderProcessor/PlaceholderProcessorEditor.h

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,25 @@
2424
#ifndef PLACEHOLDERPROCESSOREDITOR_H_INCLUDED
2525
#define PLACEHOLDERPROCESSOREDITOR_H_INCLUDED
2626

27-
28-
27+
#include "../../../JuceLibraryCode/JuceHeader.h"
28+
#include "../Editors/GenericEditor.h"
29+
30+
class PlaceholderProcessorEditor : public GenericEditor
31+
{
32+
public:
33+
PlaceholderProcessorEditor(GenericProcessor* parentNode, String pName, String lName, int lVer);
34+
~PlaceholderProcessorEditor();
35+
36+
private:
37+
const String processorName;
38+
const String libName;
39+
const int libVersion;
40+
ScopedPointer<Label> nameLabel;
41+
ScopedPointer<Label> libLabel;
42+
ScopedPointer<Label> notfoundLabel;
43+
44+
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PlaceholderProcessorEditor);
45+
};
2946

3047

3148
#endif // PLACEHOLDERPROCESSOREDITOR_H_INCLUDED

0 commit comments

Comments
 (0)