diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index cc5515b8b8..67a42c312d 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -31065,10 +31065,10 @@ public: AudioProcessorEditor* createEditor(); - const String getInputChannelName (const int index) const; + const String getInputChannelName (int index) const; bool isInputChannelStereoPair (int index) const; - const String getOutputChannelName (const int index) const; + const String getOutputChannelName (int index) const; bool isOutputChannelStereoPair (int index) const; int getNumParameters(); @@ -32101,7 +32101,7 @@ void AudioUnitPluginInstance::changeProgramName (int index, const String& newNam jassertfalse; // xxx not implemented! } -const String AudioUnitPluginInstance::getInputChannelName (const int index) const +const String AudioUnitPluginInstance::getInputChannelName (int index) const { if (((unsigned int) index) < (unsigned int) getNumInputChannels()) return "Input " + String (index + 1); @@ -32117,7 +32117,7 @@ bool AudioUnitPluginInstance::isInputChannelStereoPair (int index) const return true; } -const String AudioUnitPluginInstance::getOutputChannelName (const int index) const +const String AudioUnitPluginInstance::getOutputChannelName (int index) const { if (((unsigned int) index) < (unsigned int) getNumOutputChannels()) return "Output " + String (index + 1); @@ -33154,10 +33154,10 @@ public: AudioProcessorEditor* createEditor(); - const String getInputChannelName (const int index) const; + const String getInputChannelName (int index) const; bool isInputChannelStereoPair (int index) const; - const String getOutputChannelName (const int index) const; + const String getOutputChannelName (int index) const; bool isOutputChannelStereoPair (int index) const; int getNumParameters() { return effect != 0 ? effect->numParams : 0; } @@ -35122,7 +35122,7 @@ const String VSTPluginInstance::getCurrentProgramName() return String::empty; } -const String VSTPluginInstance::getInputChannelName (const int index) const +const String VSTPluginInstance::getInputChannelName (int index) const { if (index >= 0 && index < getNumInputChannels()) { @@ -35146,7 +35146,7 @@ bool VSTPluginInstance::isInputChannelStereoPair (int index) const return true; } -const String VSTPluginInstance::getOutputChannelName (const int index) const +const String VSTPluginInstance::getOutputChannelName (int index) const { if (index >= 0 && index < getNumOutputChannels()) { @@ -35759,7 +35759,6 @@ AudioProcessorGraph::Node::Node (const uint32 id_, AudioProcessor* const process AudioProcessorGraph::Node::~Node() { - delete processor; } void AudioProcessorGraph::Node::prepare (const double sampleRate, const int blockSize, @@ -35770,7 +35769,7 @@ void AudioProcessorGraph::Node::prepare (const double sampleRate, const int bloc isPrepared = true; AudioProcessorGraph::AudioGraphIOProcessor* const ioProc - = dynamic_cast (processor); + = dynamic_cast (static_cast (processor)); if (ioProc != 0) ioProc->setParentGraph (graph); @@ -35853,7 +35852,7 @@ AudioProcessorGraph::Node* AudioProcessorGraph::addNode (AudioProcessor* const n triggerAsyncUpdate(); AudioProcessorGraph::AudioGraphIOProcessor* const ioProc - = dynamic_cast (n->processor); + = dynamic_cast (static_cast (n->processor)); if (ioProc != 0) ioProc->setParentGraph (this); @@ -35870,7 +35869,7 @@ bool AudioProcessorGraph::removeNode (const uint32 nodeId) if (nodes.getUnchecked(i)->id == nodeId) { AudioProcessorGraph::AudioGraphIOProcessor* const ioProc - = dynamic_cast (nodes.getUnchecked(i)->processor); + = dynamic_cast (static_cast (nodes.getUnchecked(i)->processor)); if (ioProc != 0) ioProc->setParentGraph (0); @@ -36271,7 +36270,6 @@ public: } int getNumBuffersNeeded() const { return nodeIds.size(); } - int getNumMidiBuffersNeeded() const { return midiNodeIds.size(); } juce_UseDebuggingNewOperator @@ -36808,43 +36806,22 @@ void AudioProcessorGraph::processBlock (AudioSampleBuffer& buffer, MidiBuffer& m midiMessages.addEvents (currentMidiOutputBuffer, 0, buffer.getNumSamples(), 0); } -const String AudioProcessorGraph::getInputChannelName (const int channelIndex) const +const String AudioProcessorGraph::getInputChannelName (int channelIndex) const { return "Input " + String (channelIndex + 1); } -const String AudioProcessorGraph::getOutputChannelName (const int channelIndex) const +const String AudioProcessorGraph::getOutputChannelName (int channelIndex) const { return "Output " + String (channelIndex + 1); } -bool AudioProcessorGraph::isInputChannelStereoPair (int /*index*/) const -{ - return true; -} - -bool AudioProcessorGraph::isOutputChannelStereoPair (int /*index*/) const -{ - return true; -} - -bool AudioProcessorGraph::acceptsMidi() const -{ - return true; -} - -bool AudioProcessorGraph::producesMidi() const -{ - return true; -} - -void AudioProcessorGraph::getStateInformation (JUCE_NAMESPACE::MemoryBlock& /*destData*/) -{ -} - -void AudioProcessorGraph::setStateInformation (const void* /*data*/, int /*sizeInBytes*/) -{ -} +bool AudioProcessorGraph::isInputChannelStereoPair (int /*index*/) const { return true; } +bool AudioProcessorGraph::isOutputChannelStereoPair (int /*index*/) const { return true; } +bool AudioProcessorGraph::acceptsMidi() const { return true; } +bool AudioProcessorGraph::producesMidi() const { return true; } +void AudioProcessorGraph::getStateInformation (JUCE_NAMESPACE::MemoryBlock& /*destData*/) {} +void AudioProcessorGraph::setStateInformation (const void* /*data*/, int /*sizeInBytes*/) {} AudioProcessorGraph::AudioGraphIOProcessor::AudioGraphIOProcessor (const IODeviceType type_) : type (type_), @@ -36860,16 +36837,11 @@ const String AudioProcessorGraph::AudioGraphIOProcessor::getName() const { switch (type) { - case audioOutputNode: - return "Audio Output"; - case audioInputNode: - return "Audio Input"; - case midiOutputNode: - return "Midi Output"; - case midiInputNode: - return "Midi Input"; - default: - break; + case audioOutputNode: return "Audio Output"; + case audioInputNode: return "Audio Input"; + case midiOutputNode: return "Midi Output"; + case midiInputNode: return "Midi Input"; + default: break; } return String::empty; @@ -36955,31 +36927,25 @@ bool AudioProcessorGraph::AudioGraphIOProcessor::producesMidi() const return type == midiInputNode; } -const String AudioProcessorGraph::AudioGraphIOProcessor::getInputChannelName (const int channelIndex) const +const String AudioProcessorGraph::AudioGraphIOProcessor::getInputChannelName (int channelIndex) const { switch (type) { - case audioOutputNode: - return "Output " + String (channelIndex + 1); - case midiOutputNode: - return "Midi Output"; - default: - break; + case audioOutputNode: return "Output " + String (channelIndex + 1); + case midiOutputNode: return "Midi Output"; + default: break; } return String::empty; } -const String AudioProcessorGraph::AudioGraphIOProcessor::getOutputChannelName (const int channelIndex) const +const String AudioProcessorGraph::AudioGraphIOProcessor::getOutputChannelName (int channelIndex) const { switch (type) { - case audioInputNode: - return "Input " + String (channelIndex + 1); - case midiInputNode: - return "Midi Input"; - default: - break; + case audioInputNode: return "Input " + String (channelIndex + 1); + case midiInputNode: return "Midi Input"; + default: break; } return String::empty; diff --git a/juce_amalgamated.h b/juce_amalgamated.h index 24682ff1d9..3698b5e15b 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -6575,7 +6575,7 @@ public: ~Expression(); /** Creates a simple expression with a specified constant value. */ - explicit Expression (const double constant); + explicit Expression (double constant); /** Creates a copy of an expression. */ Expression (const Expression& other); @@ -30362,7 +30362,7 @@ public: @see AudioFormatReader */ virtual AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails) = 0; + bool deleteStreamIfOpeningFails) = 0; /** Tries to create an object that can write to a stream with this audio format. @@ -30446,7 +30446,7 @@ public: #endif AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, @@ -31210,7 +31210,7 @@ public: bool isCompressed(); AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, @@ -31270,7 +31270,7 @@ public: int estimateOggFileQuality (const File& source); AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, @@ -31320,7 +31320,7 @@ public: bool canDoMono(); AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, @@ -31437,7 +31437,7 @@ public: bool canDoMono(); AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, @@ -40782,7 +40782,7 @@ public: /** The actual processor object that this node represents. */ - AudioProcessor* const processor; + const ScopedPointer processor; /** A set of user-definable properties that are associated with this node. @@ -41016,8 +41016,8 @@ public: void releaseResources(); void processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages); - const String getInputChannelName (const int channelIndex) const; - const String getOutputChannelName (const int channelIndex) const; + const String getInputChannelName (int channelIndex) const; + const String getOutputChannelName (int channelIndex) const; bool isInputChannelStereoPair (int index) const; bool isOutputChannelStereoPair (int index) const; bool acceptsMidi() const; @@ -41061,8 +41061,8 @@ public: void releaseResources(); void processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages); - const String getInputChannelName (const int channelIndex) const; - const String getOutputChannelName (const int channelIndex) const; + const String getInputChannelName (int channelIndex) const; + const String getOutputChannelName (int channelIndex) const; bool isInputChannelStereoPair (int index) const; bool isOutputChannelStereoPair (int index) const; @@ -41775,9 +41775,9 @@ public: This method will be called automatically according to the midi data passed into renderNextBlock(), but may be called explicitly too. */ - virtual void noteOn (const int midiChannel, - const int midiNoteNumber, - const float velocity); + virtual void noteOn (int midiChannel, + int midiNoteNumber, + float velocity); /** Triggers a note-off event. @@ -41789,9 +41789,9 @@ public: This method will be called automatically according to the midi data passed into renderNextBlock(), but may be called explicitly too. */ - virtual void noteOff (const int midiChannel, - const int midiNoteNumber, - const bool allowTailOff); + virtual void noteOff (int midiChannel, + int midiNoteNumber, + bool allowTailOff); /** Turns off all notes. @@ -41806,8 +41806,8 @@ public: This method will be called automatically according to the midi data passed into renderNextBlock(), but may be called explicitly too. */ - virtual void allNotesOff (const int midiChannel, - const bool allowTailOff); + virtual void allNotesOff (int midiChannel, + bool allowTailOff); /** Sends a pitch-wheel message. @@ -41820,8 +41820,8 @@ public: @param midiChannel the midi channel for the event @param wheelValue the wheel position, from 0 to 0x3fff, as returned by MidiMessage::getPitchWheelValue() */ - virtual void handlePitchWheel (const int midiChannel, - const int wheelValue); + virtual void handlePitchWheel (int midiChannel, + int wheelValue); /** Sends a midi controller message. @@ -41835,9 +41835,9 @@ public: @param controllerNumber the midi controller type, as returned by MidiMessage::getControllerNumber() @param controllerValue the midi controller value, between 0 and 127, as returned by MidiMessage::getControllerValue() */ - virtual void handleController (const int midiChannel, - const int controllerNumber, - const int controllerValue); + virtual void handleController (int midiChannel, + int controllerNumber, + int controllerValue); /** Tells the synthesiser what the sample rate is for the audio it's being used to render. @@ -41845,7 +41845,7 @@ public: This value is propagated to the voices so that they can use it to render the correct pitches. */ - void setCurrentPlaybackSampleRate (const double sampleRate); + void setCurrentPlaybackSampleRate (double sampleRate); /** Creates the next block of audio output. diff --git a/src/audio/audio_file_formats/juce_AiffAudioFormat.h b/src/audio/audio_file_formats/juce_AiffAudioFormat.h index 27e1989bc1..12c18ff0bf 100644 --- a/src/audio/audio_file_formats/juce_AiffAudioFormat.h +++ b/src/audio/audio_file_formats/juce_AiffAudioFormat.h @@ -56,7 +56,7 @@ public: //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, diff --git a/src/audio/audio_file_formats/juce_AudioFormat.h b/src/audio/audio_file_formats/juce_AudioFormat.h index 11c2c1dad6..dc6a3685c8 100644 --- a/src/audio/audio_file_formats/juce_AudioFormat.h +++ b/src/audio/audio_file_formats/juce_AudioFormat.h @@ -112,7 +112,7 @@ public: @see AudioFormatReader */ virtual AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails) = 0; + bool deleteStreamIfOpeningFails) = 0; /** Tries to create an object that can write to a stream with this audio format. diff --git a/src/audio/audio_file_formats/juce_FlacAudioFormat.h b/src/audio/audio_file_formats/juce_FlacAudioFormat.h index 733c2d1e3d..95545ab0a0 100644 --- a/src/audio/audio_file_formats/juce_FlacAudioFormat.h +++ b/src/audio/audio_file_formats/juce_FlacAudioFormat.h @@ -57,7 +57,7 @@ public: //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, diff --git a/src/audio/audio_file_formats/juce_OggVorbisAudioFormat.h b/src/audio/audio_file_formats/juce_OggVorbisAudioFormat.h index 996c12b2d3..c43c13d70c 100644 --- a/src/audio/audio_file_formats/juce_OggVorbisAudioFormat.h +++ b/src/audio/audio_file_formats/juce_OggVorbisAudioFormat.h @@ -70,7 +70,7 @@ public: //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, diff --git a/src/audio/audio_file_formats/juce_QuickTimeAudioFormat.h b/src/audio/audio_file_formats/juce_QuickTimeAudioFormat.h index cb801812fb..f3fb055075 100644 --- a/src/audio/audio_file_formats/juce_QuickTimeAudioFormat.h +++ b/src/audio/audio_file_formats/juce_QuickTimeAudioFormat.h @@ -57,7 +57,7 @@ public: //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, diff --git a/src/audio/audio_file_formats/juce_WavAudioFormat.h b/src/audio/audio_file_formats/juce_WavAudioFormat.h index 744cf65475..c5630c71b8 100644 --- a/src/audio/audio_file_formats/juce_WavAudioFormat.h +++ b/src/audio/audio_file_formats/juce_WavAudioFormat.h @@ -126,7 +126,7 @@ public: //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails); AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, diff --git a/src/audio/plugins/formats/juce_AudioUnitPluginFormat.mm b/src/audio/plugins/formats/juce_AudioUnitPluginFormat.mm index 83c4e9a7d6..b8dea7be67 100644 --- a/src/audio/plugins/formats/juce_AudioUnitPluginFormat.mm +++ b/src/audio/plugins/formats/juce_AudioUnitPluginFormat.mm @@ -233,10 +233,10 @@ public: AudioProcessorEditor* createEditor(); - const String getInputChannelName (const int index) const; + const String getInputChannelName (int index) const; bool isInputChannelStereoPair (int index) const; - const String getOutputChannelName (const int index) const; + const String getOutputChannelName (int index) const; bool isOutputChannelStereoPair (int index) const; //============================================================================== @@ -1296,7 +1296,7 @@ void AudioUnitPluginInstance::changeProgramName (int index, const String& newNam } //============================================================================== -const String AudioUnitPluginInstance::getInputChannelName (const int index) const +const String AudioUnitPluginInstance::getInputChannelName (int index) const { if (((unsigned int) index) < (unsigned int) getNumInputChannels()) return "Input " + String (index + 1); @@ -1313,7 +1313,7 @@ bool AudioUnitPluginInstance::isInputChannelStereoPair (int index) const return true; } -const String AudioUnitPluginInstance::getOutputChannelName (const int index) const +const String AudioUnitPluginInstance::getOutputChannelName (int index) const { if (((unsigned int) index) < (unsigned int) getNumOutputChannels()) return "Output " + String (index + 1); diff --git a/src/audio/plugins/formats/juce_VSTPluginFormat.cpp b/src/audio/plugins/formats/juce_VSTPluginFormat.cpp index 0bd5a26fe2..90fabab845 100644 --- a/src/audio/plugins/formats/juce_VSTPluginFormat.cpp +++ b/src/audio/plugins/formats/juce_VSTPluginFormat.cpp @@ -724,10 +724,10 @@ public: AudioProcessorEditor* createEditor(); - const String getInputChannelName (const int index) const; + const String getInputChannelName (int index) const; bool isInputChannelStereoPair (int index) const; - const String getOutputChannelName (const int index) const; + const String getOutputChannelName (int index) const; bool isOutputChannelStereoPair (int index) const; //============================================================================== @@ -2727,7 +2727,7 @@ const String VSTPluginInstance::getCurrentProgramName() } //============================================================================== -const String VSTPluginInstance::getInputChannelName (const int index) const +const String VSTPluginInstance::getInputChannelName (int index) const { if (index >= 0 && index < getNumInputChannels()) { @@ -2751,7 +2751,7 @@ bool VSTPluginInstance::isInputChannelStereoPair (int index) const return true; } -const String VSTPluginInstance::getOutputChannelName (const int index) const +const String VSTPluginInstance::getOutputChannelName (int index) const { if (index >= 0 && index < getNumOutputChannels()) { diff --git a/src/audio/processors/juce_AudioProcessorGraph.cpp b/src/audio/processors/juce_AudioProcessorGraph.cpp index 0f824512b2..fc36555e8b 100644 --- a/src/audio/processors/juce_AudioProcessorGraph.cpp +++ b/src/audio/processors/juce_AudioProcessorGraph.cpp @@ -44,7 +44,6 @@ AudioProcessorGraph::Node::Node (const uint32 id_, AudioProcessor* const process AudioProcessorGraph::Node::~Node() { - delete processor; } void AudioProcessorGraph::Node::prepare (const double sampleRate, const int blockSize, @@ -55,7 +54,7 @@ void AudioProcessorGraph::Node::prepare (const double sampleRate, const int bloc isPrepared = true; AudioProcessorGraph::AudioGraphIOProcessor* const ioProc - = dynamic_cast (processor); + = dynamic_cast (static_cast (processor)); if (ioProc != 0) ioProc->setParentGraph (graph); @@ -140,7 +139,7 @@ AudioProcessorGraph::Node* AudioProcessorGraph::addNode (AudioProcessor* const n triggerAsyncUpdate(); AudioProcessorGraph::AudioGraphIOProcessor* const ioProc - = dynamic_cast (n->processor); + = dynamic_cast (static_cast (n->processor)); if (ioProc != 0) ioProc->setParentGraph (this); @@ -157,7 +156,7 @@ bool AudioProcessorGraph::removeNode (const uint32 nodeId) if (nodes.getUnchecked(i)->id == nodeId) { AudioProcessorGraph::AudioGraphIOProcessor* const ioProc - = dynamic_cast (nodes.getUnchecked(i)->processor); + = dynamic_cast (static_cast (nodes.getUnchecked(i)->processor)); if (ioProc != 0) ioProc->setParentGraph (0); @@ -569,10 +568,8 @@ public: } int getNumBuffersNeeded() const { return nodeIds.size(); } - int getNumMidiBuffersNeeded() const { return midiNodeIds.size(); } - //============================================================================== juce_UseDebuggingNewOperator @@ -1112,43 +1109,22 @@ void AudioProcessorGraph::processBlock (AudioSampleBuffer& buffer, MidiBuffer& m midiMessages.addEvents (currentMidiOutputBuffer, 0, buffer.getNumSamples(), 0); } -const String AudioProcessorGraph::getInputChannelName (const int channelIndex) const +const String AudioProcessorGraph::getInputChannelName (int channelIndex) const { return "Input " + String (channelIndex + 1); } -const String AudioProcessorGraph::getOutputChannelName (const int channelIndex) const +const String AudioProcessorGraph::getOutputChannelName (int channelIndex) const { return "Output " + String (channelIndex + 1); } -bool AudioProcessorGraph::isInputChannelStereoPair (int /*index*/) const -{ - return true; -} - -bool AudioProcessorGraph::isOutputChannelStereoPair (int /*index*/) const -{ - return true; -} - -bool AudioProcessorGraph::acceptsMidi() const -{ - return true; -} - -bool AudioProcessorGraph::producesMidi() const -{ - return true; -} - -void AudioProcessorGraph::getStateInformation (JUCE_NAMESPACE::MemoryBlock& /*destData*/) -{ -} - -void AudioProcessorGraph::setStateInformation (const void* /*data*/, int /*sizeInBytes*/) -{ -} +bool AudioProcessorGraph::isInputChannelStereoPair (int /*index*/) const { return true; } +bool AudioProcessorGraph::isOutputChannelStereoPair (int /*index*/) const { return true; } +bool AudioProcessorGraph::acceptsMidi() const { return true; } +bool AudioProcessorGraph::producesMidi() const { return true; } +void AudioProcessorGraph::getStateInformation (JUCE_NAMESPACE::MemoryBlock& /*destData*/) {} +void AudioProcessorGraph::setStateInformation (const void* /*data*/, int /*sizeInBytes*/) {} //============================================================================== @@ -1166,16 +1142,11 @@ const String AudioProcessorGraph::AudioGraphIOProcessor::getName() const { switch (type) { - case audioOutputNode: - return "Audio Output"; - case audioInputNode: - return "Audio Input"; - case midiOutputNode: - return "Midi Output"; - case midiInputNode: - return "Midi Input"; - default: - break; + case audioOutputNode: return "Audio Output"; + case audioInputNode: return "Audio Input"; + case midiOutputNode: return "Midi Output"; + case midiInputNode: return "Midi Input"; + default: break; } return String::empty; @@ -1261,31 +1232,25 @@ bool AudioProcessorGraph::AudioGraphIOProcessor::producesMidi() const return type == midiInputNode; } -const String AudioProcessorGraph::AudioGraphIOProcessor::getInputChannelName (const int channelIndex) const +const String AudioProcessorGraph::AudioGraphIOProcessor::getInputChannelName (int channelIndex) const { switch (type) { - case audioOutputNode: - return "Output " + String (channelIndex + 1); - case midiOutputNode: - return "Midi Output"; - default: - break; + case audioOutputNode: return "Output " + String (channelIndex + 1); + case midiOutputNode: return "Midi Output"; + default: break; } return String::empty; } -const String AudioProcessorGraph::AudioGraphIOProcessor::getOutputChannelName (const int channelIndex) const +const String AudioProcessorGraph::AudioGraphIOProcessor::getOutputChannelName (int channelIndex) const { switch (type) { - case audioInputNode: - return "Input " + String (channelIndex + 1); - case midiInputNode: - return "Midi Input"; - default: - break; + case audioInputNode: return "Input " + String (channelIndex + 1); + case midiInputNode: return "Midi Input"; + default: break; } return String::empty; diff --git a/src/audio/processors/juce_AudioProcessorGraph.h b/src/audio/processors/juce_AudioProcessorGraph.h index 4c73bbd4cc..9e32b03a26 100644 --- a/src/audio/processors/juce_AudioProcessorGraph.h +++ b/src/audio/processors/juce_AudioProcessorGraph.h @@ -83,7 +83,7 @@ public: /** The actual processor object that this node represents. */ - AudioProcessor* const processor; + const ScopedPointer processor; /** A set of user-definable properties that are associated with this node. @@ -328,8 +328,8 @@ public: void releaseResources(); void processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages); - const String getInputChannelName (const int channelIndex) const; - const String getOutputChannelName (const int channelIndex) const; + const String getInputChannelName (int channelIndex) const; + const String getOutputChannelName (int channelIndex) const; bool isInputChannelStereoPair (int index) const; bool isOutputChannelStereoPair (int index) const; bool acceptsMidi() const; @@ -374,8 +374,8 @@ public: void releaseResources(); void processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages); - const String getInputChannelName (const int channelIndex) const; - const String getOutputChannelName (const int channelIndex) const; + const String getInputChannelName (int channelIndex) const; + const String getOutputChannelName (int channelIndex) const; bool isInputChannelStereoPair (int index) const; bool isOutputChannelStereoPair (int index) const; diff --git a/src/audio/synthesisers/juce_Synthesiser.h b/src/audio/synthesisers/juce_Synthesiser.h index 81bf7cb4a8..777d4b8d62 100644 --- a/src/audio/synthesisers/juce_Synthesiser.h +++ b/src/audio/synthesisers/juce_Synthesiser.h @@ -342,9 +342,9 @@ public: This method will be called automatically according to the midi data passed into renderNextBlock(), but may be called explicitly too. */ - virtual void noteOn (const int midiChannel, - const int midiNoteNumber, - const float velocity); + virtual void noteOn (int midiChannel, + int midiNoteNumber, + float velocity); /** Triggers a note-off event. @@ -356,9 +356,9 @@ public: This method will be called automatically according to the midi data passed into renderNextBlock(), but may be called explicitly too. */ - virtual void noteOff (const int midiChannel, - const int midiNoteNumber, - const bool allowTailOff); + virtual void noteOff (int midiChannel, + int midiNoteNumber, + bool allowTailOff); /** Turns off all notes. @@ -373,8 +373,8 @@ public: This method will be called automatically according to the midi data passed into renderNextBlock(), but may be called explicitly too. */ - virtual void allNotesOff (const int midiChannel, - const bool allowTailOff); + virtual void allNotesOff (int midiChannel, + bool allowTailOff); /** Sends a pitch-wheel message. @@ -387,8 +387,8 @@ public: @param midiChannel the midi channel for the event @param wheelValue the wheel position, from 0 to 0x3fff, as returned by MidiMessage::getPitchWheelValue() */ - virtual void handlePitchWheel (const int midiChannel, - const int wheelValue); + virtual void handlePitchWheel (int midiChannel, + int wheelValue); /** Sends a midi controller message. @@ -402,9 +402,9 @@ public: @param controllerNumber the midi controller type, as returned by MidiMessage::getControllerNumber() @param controllerValue the midi controller value, between 0 and 127, as returned by MidiMessage::getControllerValue() */ - virtual void handleController (const int midiChannel, - const int controllerNumber, - const int controllerValue); + virtual void handleController (int midiChannel, + int controllerNumber, + int controllerValue); //============================================================================== /** Tells the synthesiser what the sample rate is for the audio it's being used to @@ -413,7 +413,7 @@ public: This value is propagated to the voices so that they can use it to render the correct pitches. */ - void setCurrentPlaybackSampleRate (const double sampleRate); + void setCurrentPlaybackSampleRate (double sampleRate); /** Creates the next block of audio output. diff --git a/src/containers/juce_Expression.h b/src/containers/juce_Expression.h index 49e58ec53e..0833eb1ed5 100644 --- a/src/containers/juce_Expression.h +++ b/src/containers/juce_Expression.h @@ -57,7 +57,7 @@ public: ~Expression(); /** Creates a simple expression with a specified constant value. */ - explicit Expression (const double constant); + explicit Expression (double constant); /** Creates a copy of an expression. */ Expression (const Expression& other);