rename main class

This commit is contained in:
Alex Birch 2018-02-27 00:39:50 +00:00
parent c708fd5914
commit c129ce78a0
No known key found for this signature in database
GPG Key ID: 305EB1F98D44ACBA
4 changed files with 35 additions and 35 deletions

View File

@ -12,7 +12,7 @@
#include "PluginEditor.h" #include "PluginEditor.h"
//============================================================================== //==============================================================================
LazarusAudioProcessorEditor::LazarusAudioProcessorEditor (LazarusAudioProcessor& p) LazarusAudioProcessorEditor::LazarusAudioProcessorEditor (JuicySFAudioProcessor& p)
: AudioProcessorEditor (&p), : AudioProcessorEditor (&p),
processor (p), processor (p),
midiKeyboard (p.keyboardState, SurjectiveMidiKeyboardComponent::horizontalKeyboard), midiKeyboard (p.keyboardState, SurjectiveMidiKeyboardComponent::horizontalKeyboard),

View File

@ -22,7 +22,7 @@
class LazarusAudioProcessorEditor : public AudioProcessorEditor class LazarusAudioProcessorEditor : public AudioProcessorEditor
{ {
public: public:
LazarusAudioProcessorEditor (LazarusAudioProcessor&); LazarusAudioProcessorEditor (JuicySFAudioProcessor&);
~LazarusAudioProcessorEditor(); ~LazarusAudioProcessorEditor();
//============================================================================== //==============================================================================
@ -35,7 +35,7 @@ public:
private: private:
// This reference is provided as a quick way for your editor to // This reference is provided as a quick way for your editor to
// access the processor object that created it. // access the processor object that created it.
LazarusAudioProcessor& processor; JuicySFAudioProcessor& processor;
SurjectiveMidiKeyboardComponent midiKeyboard; SurjectiveMidiKeyboardComponent midiKeyboard;
TablesComponent tablesComponent; TablesComponent tablesComponent;

View File

@ -17,7 +17,7 @@ AudioProcessor* JUCE_CALLTYPE createPluginFilter();
//============================================================================== //==============================================================================
LazarusAudioProcessor::LazarusAudioProcessor() JuicySFAudioProcessor::JuicySFAudioProcessor()
: AudioProcessor (getBusesProperties()), : AudioProcessor (getBusesProperties()),
fluidSynthModel(), fluidSynthModel(),
lastUIWidth(400), lastUIWidth(400),
@ -26,12 +26,12 @@ LazarusAudioProcessor::LazarusAudioProcessor()
initialiseSynth(); initialiseSynth();
} }
LazarusAudioProcessor::~LazarusAudioProcessor() JuicySFAudioProcessor::~JuicySFAudioProcessor()
{ {
// delete fluidSynthModel; // delete fluidSynthModel;
} }
void LazarusAudioProcessor::initialiseSynth() { void JuicySFAudioProcessor::initialiseSynth() {
fluidSynthModel.initialise(); fluidSynthModel.initialise();
fluidSynth = fluidSynthModel.getSynth(); fluidSynth = fluidSynthModel.getSynth();
@ -47,12 +47,12 @@ void LazarusAudioProcessor::initialiseSynth() {
} }
//============================================================================== //==============================================================================
const String LazarusAudioProcessor::getName() const const String JuicySFAudioProcessor::getName() const
{ {
return JucePlugin_Name; return JucePlugin_Name;
} }
bool LazarusAudioProcessor::acceptsMidi() const bool JuicySFAudioProcessor::acceptsMidi() const
{ {
#if JucePlugin_WantsMidiInput #if JucePlugin_WantsMidiInput
return true; return true;
@ -61,7 +61,7 @@ bool LazarusAudioProcessor::acceptsMidi() const
#endif #endif
} }
bool LazarusAudioProcessor::producesMidi() const bool JuicySFAudioProcessor::producesMidi() const
{ {
#if JucePlugin_ProducesMidiOutput #if JucePlugin_ProducesMidiOutput
return true; return true;
@ -70,37 +70,37 @@ bool LazarusAudioProcessor::producesMidi() const
#endif #endif
} }
double LazarusAudioProcessor::getTailLengthSeconds() const double JuicySFAudioProcessor::getTailLengthSeconds() const
{ {
return 0.0; return 0.0;
} }
int LazarusAudioProcessor::getNumPrograms() int JuicySFAudioProcessor::getNumPrograms()
{ {
return 1; // NB: some hosts don't cope very well if you tell them there are 0 programs, return 1; // NB: some hosts don't cope very well if you tell them there are 0 programs,
// so this should be at least 1, even if you're not really implementing programs. // so this should be at least 1, even if you're not really implementing programs.
} }
int LazarusAudioProcessor::getCurrentProgram() int JuicySFAudioProcessor::getCurrentProgram()
{ {
return 0; return 0;
} }
void LazarusAudioProcessor::setCurrentProgram (int index) void JuicySFAudioProcessor::setCurrentProgram (int index)
{ {
} }
const String LazarusAudioProcessor::getProgramName (int index) const String JuicySFAudioProcessor::getProgramName (int index)
{ {
return {}; return {};
} }
void LazarusAudioProcessor::changeProgramName (int index, const String& newName) void JuicySFAudioProcessor::changeProgramName (int index, const String& newName)
{ {
} }
//============================================================================== //==============================================================================
void LazarusAudioProcessor::prepareToPlay (double sampleRate, int /*samplesPerBlock*/) void JuicySFAudioProcessor::prepareToPlay (double sampleRate, int /*samplesPerBlock*/)
{ {
// Use this method as the place to do any pre-playback // Use this method as the place to do any pre-playback
// initialisation that you need.. // initialisation that you need..
@ -110,14 +110,14 @@ void LazarusAudioProcessor::prepareToPlay (double sampleRate, int /*samplesPerBl
reset(); reset();
} }
void LazarusAudioProcessor::releaseResources() void JuicySFAudioProcessor::releaseResources()
{ {
// When playback stops, you can use this as an opportunity to free up any // When playback stops, you can use this as an opportunity to free up any
// spare memory, etc. // spare memory, etc.
keyboardState.reset(); keyboardState.reset();
} }
bool LazarusAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const bool JuicySFAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{ {
// Only mono/stereo and input/output must have same layout // Only mono/stereo and input/output must have same layout
const AudioChannelSet& mainOutput = layouts.getMainOutputChannelSet(); const AudioChannelSet& mainOutput = layouts.getMainOutputChannelSet();
@ -135,12 +135,12 @@ bool LazarusAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts)
return mainOutput.size() <= 2; return mainOutput.size() <= 2;
} }
AudioProcessor::BusesProperties LazarusAudioProcessor::getBusesProperties() { AudioProcessor::BusesProperties JuicySFAudioProcessor::getBusesProperties() {
return BusesProperties().withInput ("Input", AudioChannelSet::stereo(), true) return BusesProperties().withInput ("Input", AudioChannelSet::stereo(), true)
.withOutput ("Output", AudioChannelSet::stereo(), true); .withOutput ("Output", AudioChannelSet::stereo(), true);
} }
void LazarusAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages) { void JuicySFAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages) {
jassert (!isUsingDoublePrecision()); jassert (!isUsingDoublePrecision());
const int numSamples = buffer.getNumSamples(); const int numSamples = buffer.getNumSamples();
@ -163,18 +163,18 @@ void LazarusAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer
} }
//============================================================================== //==============================================================================
bool LazarusAudioProcessor::hasEditor() const bool JuicySFAudioProcessor::hasEditor() const
{ {
return true; // (change this to false if you choose to not supply an editor) return true; // (change this to false if you choose to not supply an editor)
} }
AudioProcessorEditor* LazarusAudioProcessor::createEditor() AudioProcessorEditor* JuicySFAudioProcessor::createEditor()
{ {
return new LazarusAudioProcessorEditor (*this); return new LazarusAudioProcessorEditor (*this);
} }
//============================================================================== //==============================================================================
void LazarusAudioProcessor::getStateInformation (MemoryBlock& destData) void JuicySFAudioProcessor::getStateInformation (MemoryBlock& destData)
{ {
// You should use this method to store your parameters in the memory block. // You should use this method to store your parameters in the memory block.
// You could do that either as raw data, or use the XML or ValueTree classes // You could do that either as raw data, or use the XML or ValueTree classes
@ -196,7 +196,7 @@ void LazarusAudioProcessor::getStateInformation (MemoryBlock& destData)
copyXmlToBinary (xml, destData); copyXmlToBinary (xml, destData);
} }
void LazarusAudioProcessor::setStateInformation (const void* data, int sizeInBytes) void JuicySFAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{ {
// You should use this method to restore your parameters from this memory block, // You should use this method to restore your parameters from this memory block,
// whose contents will have been created by the getStateInformation() call. // whose contents will have been created by the getStateInformation() call.
@ -221,11 +221,11 @@ void LazarusAudioProcessor::setStateInformation (const void* data, int sizeInByt
} }
// FluidSynth only supports float in its process function, so that's all we can support. // FluidSynth only supports float in its process function, so that's all we can support.
bool LazarusAudioProcessor::supportsDoublePrecisionProcessing() const { bool JuicySFAudioProcessor::supportsDoublePrecisionProcessing() const {
return false; return false;
} }
FluidSynthModel* LazarusAudioProcessor::getFluidSynthModel() { FluidSynthModel* JuicySFAudioProcessor::getFluidSynthModel() {
return &fluidSynthModel; return &fluidSynthModel;
} }
@ -233,19 +233,19 @@ FluidSynthModel* LazarusAudioProcessor::getFluidSynthModel() {
// This creates new instances of the plugin.. // This creates new instances of the plugin..
AudioProcessor* JUCE_CALLTYPE createPluginFilter() AudioProcessor* JUCE_CALLTYPE createPluginFilter()
{ {
return new LazarusAudioProcessor(); return new JuicySFAudioProcessor();
} }
void LazarusAudioProcessor::setLastUIWidth(int width) { void JuicySFAudioProcessor::setLastUIWidth(int width) {
this->lastUIWidth = width; this->lastUIWidth = width;
} }
void LazarusAudioProcessor::setLastUIHeight(int height) { void JuicySFAudioProcessor::setLastUIHeight(int height) {
this->lastUIHeight = height; this->lastUIHeight = height;
} }
int LazarusAudioProcessor::getLastUIWidth() { int JuicySFAudioProcessor::getLastUIWidth() {
return lastUIWidth; return lastUIWidth;
} }
int LazarusAudioProcessor::getLastUIHeight() { int JuicySFAudioProcessor::getLastUIHeight() {
return lastUIHeight; return lastUIHeight;
} }

View File

@ -16,12 +16,12 @@
//============================================================================== //==============================================================================
/** /**
*/ */
class LazarusAudioProcessor : public AudioProcessor class JuicySFAudioProcessor : public AudioProcessor
{ {
public: public:
//============================================================================== //==============================================================================
LazarusAudioProcessor(); JuicySFAudioProcessor();
~LazarusAudioProcessor(); ~JuicySFAudioProcessor();
//============================================================================== //==============================================================================
void prepareToPlay (double sampleRate, int samplesPerBlock) override; void prepareToPlay (double sampleRate, int samplesPerBlock) override;
@ -80,5 +80,5 @@ private:
// Model* model; // Model* model;
//============================================================================== //==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LazarusAudioProcessor) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuicySFAudioProcessor)
}; };