Browse Source

Removed some unnecessary consts from the parameters for SynthesiserSound::appliesToNote and appliesToChannel

tags/2021-05-28
jules 11 years ago
parent
commit
08a49cb6d4
5 changed files with 10 additions and 10 deletions
  1. +2
    -2
      extras/Demo/Source/Demos/AudioSynthesiserDemo.cpp
  2. +2
    -2
      extras/audio plugin demo/Source/PluginProcessor.cpp
  3. +2
    -2
      modules/juce_audio_basics/synthesisers/juce_Synthesiser.h
  4. +2
    -2
      modules/juce_audio_formats/sampler/juce_Sampler.cpp
  5. +2
    -2
      modules/juce_audio_formats/sampler/juce_Sampler.h

+ 2
- 2
extras/Demo/Source/Demos/AudioSynthesiserDemo.cpp View File

@@ -32,8 +32,8 @@ struct SineWaveSound : public SynthesiserSound
{
SineWaveSound() {}
bool appliesToNote (const int /*midiNoteNumber*/) { return true; }
bool appliesToChannel (const int /*midiChannel*/) { return true; }
bool appliesToNote (int /*midiNoteNumber*/) { return true; }
bool appliesToChannel (int /*midiChannel*/) { return true; }
};


+ 2
- 2
extras/audio plugin demo/Source/PluginProcessor.cpp View File

@@ -21,8 +21,8 @@ class SineWaveSound : public SynthesiserSound
public:
SineWaveSound() {}
bool appliesToNote (const int /*midiNoteNumber*/) override { return true; }
bool appliesToChannel (const int /*midiChannel*/) override { return true; }
bool appliesToNote (int /*midiNoteNumber*/) override { return true; }
bool appliesToChannel (int /*midiChannel*/) override { return true; }
};
//==============================================================================


+ 2
- 2
modules/juce_audio_basics/synthesisers/juce_Synthesiser.h View File

@@ -55,14 +55,14 @@ public:
The Synthesiser will use this information when deciding which sounds to trigger
for a given note.
*/
virtual bool appliesToNote (const int midiNoteNumber) = 0;
virtual bool appliesToNote (int midiNoteNumber) = 0;
/** Returns true if the sound should be triggered by midi events on a given channel.
The Synthesiser will use this information when deciding which sounds to trigger
for a given note.
*/
virtual bool appliesToChannel (const int midiChannel) = 0;
virtual bool appliesToChannel (int midiChannel) = 0;
/** The class is reference-counted, so this is a handy pointer class for it. */
typedef ReferenceCountedObjectPtr<SynthesiserSound> Ptr;


+ 2
- 2
modules/juce_audio_formats/sampler/juce_Sampler.cpp View File

@@ -59,12 +59,12 @@ SamplerSound::~SamplerSound()
{
}
bool SamplerSound::appliesToNote (const int midiNoteNumber)
bool SamplerSound::appliesToNote (int midiNoteNumber)
{
return midiNotes [midiNoteNumber];
}
bool SamplerSound::appliesToChannel (const int /*midiChannel*/)
bool SamplerSound::appliesToChannel (int /*midiChannel*/)
{
return true;
}


+ 2
- 2
modules/juce_audio_formats/sampler/juce_Sampler.h View File

@@ -82,8 +82,8 @@ public:
//==============================================================================
bool appliesToNote (const int midiNoteNumber) override;
bool appliesToChannel (const int midiChannel) override;
bool appliesToNote (int midiNoteNumber) override;
bool appliesToChannel (int midiChannel) override;
private:


Loading…
Cancel
Save