Browse Source

Added a few override modifiers and fixed some documentation.

tags/2021-05-28
jules 11 years ago
parent
commit
50132270d6
10 changed files with 29 additions and 43 deletions
  1. +1
    -1
      modules/juce_audio_basics/sources/juce_BufferingAudioSource.h
  2. +5
    -8
      modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h
  3. +4
    -4
      modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h
  4. +4
    -4
      modules/juce_audio_basics/sources/juce_MixerAudioSource.h
  5. +3
    -3
      modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h
  6. +3
    -3
      modules/juce_audio_basics/sources/juce_ReverbAudioSource.h
  7. +3
    -3
      modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.h
  8. +1
    -1
      modules/juce_audio_devices/sources/juce_AudioTransportSource.h
  9. +1
    -1
      modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h
  10. +4
    -15
      modules/juce_gui_basics/widgets/juce_ListBox.h

+ 1
- 1
modules/juce_audio_basics/sources/juce_BufferingAudioSource.h View File

@@ -76,7 +76,7 @@ public:
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
//==============================================================================
/** Implements the PositionableAudioSource method. */


+ 5
- 8
modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h View File

@@ -113,32 +113,29 @@ public:
//==============================================================================
/** Returns an XML object to encapsulate the state of the mappings.
@see restoreFromXml
*/
XmlElement* createXml() const;
/** Restores the mappings from an XML object created by createXML().
@see createXml
*/
void restoreFromXml (const XmlElement& e);
void restoreFromXml (const XmlElement&);
//==============================================================================
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
void releaseResources() override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================
OptionalScopedPointer<AudioSource> source;
Array <int> remappedInputs, remappedOutputs;
Array<int> remappedInputs, remappedOutputs;
int requiredNumberOfChannels;
AudioSampleBuffer buffer;
AudioSourceChannelInfo remappedInfo;
CriticalSection lock;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelRemappingAudioSource)


+ 4
- 4
modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h View File

@@ -57,14 +57,14 @@ public:
void makeInactive();
//==============================================================================
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
void releaseResources() override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================
OptionalScopedPointer<AudioSource> input;
OwnedArray <IIRFilter> iirFilters;
OwnedArray<IIRFilter> iirFilters;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IIRFilterAudioSource)
};


+ 4
- 4
modules/juce_audio_basics/sources/juce_MixerAudioSource.h View File

@@ -76,20 +76,20 @@ public:
/** Implementation of the AudioSource method.
This will call prepareToPlay() on all its input sources.
*/
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
/** Implementation of the AudioSource method.
This will call releaseResources() on all its input sources.
*/
void releaseResources();
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================
Array <AudioSource*> inputs;
Array<AudioSource*> inputs;
BigInteger inputsToDelete;
CriticalSection lock;
AudioSampleBuffer tempBuffer;


+ 3
- 3
modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h View File

@@ -69,9 +69,9 @@ public:
double getResamplingRatio() const noexcept { return ratio; }
//==============================================================================
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
void releaseResources() override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================


+ 3
- 3
modules/juce_audio_basics/sources/juce_ReverbAudioSource.h View File

@@ -61,9 +61,9 @@ public:
bool isBypassed() const noexcept { return bypass; }
//==============================================================================
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
void releaseResources() override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================


+ 3
- 3
modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.h View File

@@ -53,13 +53,13 @@ public:
//==============================================================================
/** Implementation of the AudioSource method. */
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
/** Implementation of the AudioSource method. */
void releaseResources();
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:


+ 1
- 1
modules/juce_audio_devices/sources/juce_AudioTransportSource.h View File

@@ -147,7 +147,7 @@ public:
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
//==============================================================================
/** Implements the PositionableAudioSource method. */


+ 1
- 1
modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h View File

@@ -74,7 +74,7 @@ public:
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
//==============================================================================
/** Implements the PositionableAudioSource method. */


+ 4
- 15
modules/juce_gui_basics/widgets/juce_ListBox.h View File

@@ -43,13 +43,11 @@ public:
//==============================================================================
/** This has to return the number of items in the list.
@see ListBox::getNumRows()
*/
virtual int getNumRows() = 0;
/** This method must be implemented to draw a row of the list.
*/
/** This method must be implemented to draw a row of the list. */
virtual void paintListBoxItem (int rowNumber,
Graphics& g,
int width, int height,
@@ -86,20 +84,17 @@ public:
Component* existingComponentToUpdate);
/** This can be overridden to react to the user clicking on a row.
@see listBoxItemDoubleClicked
*/
virtual void listBoxItemClicked (int row, const MouseEvent& e);
/** This can be overridden to react to the user double-clicking on a row.
@see listBoxItemClicked
*/
virtual void listBoxItemDoubleClicked (int row, const MouseEvent& e);
/** This can be overridden to react to the user double-clicking on a part of the list where
/** This can be overridden to react to the user clicking on a part of the list where
there are no rows.
@see listBoxItemClicked
*/
virtual void backgroundClicked();
@@ -253,21 +248,17 @@ public:
int lastRow);
/** Deselects a row.
If it's not currently selected, this will do nothing.
@see selectRow, deselectAllRows
*/
void deselectRow (int rowNumber);
/** Deselects any currently selected rows.
@see deselectRow
*/
void deselectAllRows();
/** Selects or deselects a row.
If the row's currently selected, this deselects it, and vice-versa.
*/
void flipRowSelection (int rowNumber);
@@ -292,7 +283,6 @@ public:
bool isRowSelected (int rowNumber) const;
/** Returns the number of rows that are currently selected.
@see getSelectedRow, isRowSelected, getLastRowSelected
*/
int getNumSelectedRows() const;
@@ -357,8 +347,7 @@ public:
*/
double getVerticalPosition() const;
/** Scrolls if necessary to make sure that a particular row is visible.
*/
/** Scrolls if necessary to make sure that a particular row is visible. */
void scrollToEnsureRowIsOnscreen (int row);
/** Returns a pointer to the vertical scrollbar. */
@@ -560,7 +549,7 @@ private:
int outlineThickness;
int lastRowSelected;
bool multipleSelection, hasDoneInitialUpdate;
SparseSet <int> selected;
SparseSet<int> selected;
void selectRowInternal (int rowNumber, bool dontScrollToShowThisRow,
bool deselectOthersFirst, bool isMouseClick);


Loading…
Cancel
Save