Browse Source

Minor code clean-ups.

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
d9e00279cf
14 changed files with 116 additions and 185 deletions
  1. +32
    -66
      juce_amalgamated.cpp
  2. +26
    -26
      juce_amalgamated.h
  3. +1
    -1
      src/audio/audio_file_formats/juce_AiffAudioFormat.h
  4. +1
    -1
      src/audio/audio_file_formats/juce_AudioFormat.h
  5. +1
    -1
      src/audio/audio_file_formats/juce_FlacAudioFormat.h
  6. +1
    -1
      src/audio/audio_file_formats/juce_OggVorbisAudioFormat.h
  7. +1
    -1
      src/audio/audio_file_formats/juce_QuickTimeAudioFormat.h
  8. +1
    -1
      src/audio/audio_file_formats/juce_WavAudioFormat.h
  9. +4
    -4
      src/audio/plugins/formats/juce_AudioUnitPluginFormat.mm
  10. +4
    -4
      src/audio/plugins/formats/juce_VSTPluginFormat.cpp
  11. +24
    -59
      src/audio/processors/juce_AudioProcessorGraph.cpp
  12. +5
    -5
      src/audio/processors/juce_AudioProcessorGraph.h
  13. +14
    -14
      src/audio/synthesisers/juce_Synthesiser.h
  14. +1
    -1
      src/containers/juce_Expression.h

+ 32
- 66
juce_amalgamated.cpp View File

@@ -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 <AudioProcessorGraph::AudioGraphIOProcessor*> (processor);
= dynamic_cast <AudioProcessorGraph::AudioGraphIOProcessor*> (static_cast<AudioProcessor*> (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 <AudioProcessorGraph::AudioGraphIOProcessor*> (n->processor);
= dynamic_cast <AudioProcessorGraph::AudioGraphIOProcessor*> (static_cast<AudioProcessor*> (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 <AudioProcessorGraph::AudioGraphIOProcessor*> (nodes.getUnchecked(i)->processor);
= dynamic_cast <AudioProcessorGraph::AudioGraphIOProcessor*> (static_cast<AudioProcessor*> (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;


+ 26
- 26
juce_amalgamated.h View File

@@ -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<AudioProcessor> 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.



+ 1
- 1
src/audio/audio_file_formats/juce_AiffAudioFormat.h View File

@@ -56,7 +56,7 @@ public:
//==============================================================================
AudioFormatReader* createReaderFor (InputStream* sourceStream,
const bool deleteStreamIfOpeningFails);
bool deleteStreamIfOpeningFails);
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
double sampleRateToUse,


+ 1
- 1
src/audio/audio_file_formats/juce_AudioFormat.h View File

@@ -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.


+ 1
- 1
src/audio/audio_file_formats/juce_FlacAudioFormat.h View File

@@ -57,7 +57,7 @@ public:
//==============================================================================
AudioFormatReader* createReaderFor (InputStream* sourceStream,
const bool deleteStreamIfOpeningFails);
bool deleteStreamIfOpeningFails);
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
double sampleRateToUse,


+ 1
- 1
src/audio/audio_file_formats/juce_OggVorbisAudioFormat.h View File

@@ -70,7 +70,7 @@ public:
//==============================================================================
AudioFormatReader* createReaderFor (InputStream* sourceStream,
const bool deleteStreamIfOpeningFails);
bool deleteStreamIfOpeningFails);
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
double sampleRateToUse,


+ 1
- 1
src/audio/audio_file_formats/juce_QuickTimeAudioFormat.h View File

@@ -57,7 +57,7 @@ public:
//==============================================================================
AudioFormatReader* createReaderFor (InputStream* sourceStream,
const bool deleteStreamIfOpeningFails);
bool deleteStreamIfOpeningFails);
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
double sampleRateToUse,


+ 1
- 1
src/audio/audio_file_formats/juce_WavAudioFormat.h View File

@@ -126,7 +126,7 @@ public:
//==============================================================================
AudioFormatReader* createReaderFor (InputStream* sourceStream,
const bool deleteStreamIfOpeningFails);
bool deleteStreamIfOpeningFails);
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
double sampleRateToUse,


+ 4
- 4
src/audio/plugins/formats/juce_AudioUnitPluginFormat.mm View File

@@ -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);


+ 4
- 4
src/audio/plugins/formats/juce_VSTPluginFormat.cpp View File

@@ -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())
{


+ 24
- 59
src/audio/processors/juce_AudioProcessorGraph.cpp View File

@@ -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 <AudioProcessorGraph::AudioGraphIOProcessor*> (processor);
= dynamic_cast <AudioProcessorGraph::AudioGraphIOProcessor*> (static_cast<AudioProcessor*> (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 <AudioProcessorGraph::AudioGraphIOProcessor*> (n->processor);
= dynamic_cast <AudioProcessorGraph::AudioGraphIOProcessor*> (static_cast<AudioProcessor*> (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 <AudioProcessorGraph::AudioGraphIOProcessor*> (nodes.getUnchecked(i)->processor);
= dynamic_cast <AudioProcessorGraph::AudioGraphIOProcessor*> (static_cast<AudioProcessor*> (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;


+ 5
- 5
src/audio/processors/juce_AudioProcessorGraph.h View File

@@ -83,7 +83,7 @@ public:
/** The actual processor object that this node represents.
*/
AudioProcessor* const processor;
const ScopedPointer<AudioProcessor> 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;


+ 14
- 14
src/audio/synthesisers/juce_Synthesiser.h View File

@@ -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.


+ 1
- 1
src/containers/juce_Expression.h View File

@@ -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);


Loading…
Cancel
Save