Remove comments. Test nodiscard.

This commit is contained in:
xenakios 2018-10-15 18:31:56 +03:00
parent f487f8d4f2
commit 0c04922f1f
2 changed files with 2 additions and 33 deletions

View File

@ -630,7 +630,6 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioBuffer<double>& buffer,
void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages) void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
{ {
ScopedLock locker(m_cs); ScopedLock locker(m_cs);
const int totalNumInputChannels = getTotalNumInputChannels(); const int totalNumInputChannels = getTotalNumInputChannels();
const int totalNumOutputChannels = getTotalNumOutputChannels(); const int totalNumOutputChannels = getTotalNumOutputChannels();

View File

@ -15,22 +15,10 @@ www.gnu.org/licenses
*/ */
#pragma once #pragma once
#include "../JuceLibraryCode/JuceHeader.h" #include "../JuceLibraryCode/JuceHeader.h"
//==============================================================================
/**
An AudioSource which takes another source as input, and buffers it using a thread.
Create this as a wrapper around another thread, and it will read-ahead with
a background thread to smooth out playback. You can either create one of these
directly, or use it indirectly using an AudioTransportSource.
@see PositionableAudioSource, AudioTransportSource
@tags{Audio}
*/
class JUCE_API MyBufferingAudioSource : public PositionableAudioSource, class JUCE_API MyBufferingAudioSource : public PositionableAudioSource,
private TimeSliceClient private TimeSliceClient
{ {
@ -57,42 +45,24 @@ public:
int numberOfChannels = 2, int numberOfChannels = 2,
bool prefillBufferOnPrepareToPlay = true); bool prefillBufferOnPrepareToPlay = true);
/** Destructor.
The input source may be deleted depending on whether the deleteSourceWhenDeleted
flag was set in the constructor.
*/
~MyBufferingAudioSource(); ~MyBufferingAudioSource();
//==============================================================================
/** Implementation of the AudioSource method. */
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override; void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
/** Implementation of the AudioSource method. */
void releaseResources() override; void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo&) override; void getNextAudioBlock (const AudioSourceChannelInfo&) override;
//==============================================================================
/** Implements the PositionableAudioSource method. */
void setNextReadPosition (int64 newPosition) override; void setNextReadPosition (int64 newPosition) override;
/** Implements the PositionableAudioSource method. */
int64 getNextReadPosition() const override; int64 getNextReadPosition() const override;
/** Implements the PositionableAudioSource method. */
int64 getTotalLength() const override { return source->getTotalLength(); } int64 getTotalLength() const override { return source->getTotalLength(); }
/** Implements the PositionableAudioSource method. */
bool isLooping() const override { return source->isLooping(); } bool isLooping() const override { return source->isLooping(); }
/** A useful function to block until the next the buffer info can be filled.
This is useful for offline rendering.
*/
bool waitForNextAudioBlockReady (const AudioSourceChannelInfo& info, const uint32 timeout); bool waitForNextAudioBlockReady (const AudioSourceChannelInfo& info, const uint32 timeout);
double getPercentReady(); [[nodiscard]] double getPercentReady();
int getNumberOfChannels() { return numberOfChannels; } int getNumberOfChannels() { return numberOfChannels; }
private: private:
//============================================================================== //==============================================================================