From 14a078698221097123074e24236c5da48ecbdec1 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Thu, 29 Jun 2023 00:55:22 +1000 Subject: [PATCH] 3rdparty/soundtouch: Add missing overrides --- .../soundtouch/soundtouch/FIFOSampleBuffer.h | 18 +++++++++--------- .../soundtouch/soundtouch/FIFOSamplePipe.h | 14 +++++++------- 3rdparty/soundtouch/soundtouch/SoundTouch.h | 10 +++++----- .../soundtouch/source/SoundTouch/FIRFilter.h | 8 ++++---- .../source/SoundTouch/InterpolateCubic.h | 8 ++++---- .../source/SoundTouch/InterpolateLinear.h | 14 +++++++------- .../source/SoundTouch/InterpolateShannon.h | 8 ++++---- .../source/SoundTouch/RateTransposer.h | 8 ++++---- .../soundtouch/source/SoundTouch/TDStretch.h | 18 +++++++++--------- 9 files changed, 53 insertions(+), 53 deletions(-) diff --git a/3rdparty/soundtouch/soundtouch/FIFOSampleBuffer.h b/3rdparty/soundtouch/soundtouch/FIFOSampleBuffer.h index 537a7b8722..890570a99a 100644 --- a/3rdparty/soundtouch/soundtouch/FIFOSampleBuffer.h +++ b/3rdparty/soundtouch/soundtouch/FIFOSampleBuffer.h @@ -91,7 +91,7 @@ public: ); /// destructor - ~FIFOSampleBuffer(); + ~FIFOSampleBuffer() override; /// Returns a pointer to the beginning of the output samples. /// This function is provided for accessing the output samples directly. @@ -100,7 +100,7 @@ public: /// When using this function to output samples, also remember to 'remove' the /// output samples from the buffer by calling the /// 'receiveSamples(numSamples)' function - virtual SAMPLETYPE *ptrBegin(); + virtual SAMPLETYPE *ptrBegin() override; /// Returns a pointer to the end of the used part of the sample buffer (i.e. /// where the new samples are to be inserted). This function may be used for @@ -121,7 +121,7 @@ public: /// the sample buffer. virtual void putSamples(const SAMPLETYPE *samples, ///< Pointer to samples. uint numSamples ///< Number of samples to insert. - ); + ) override; /// Adjusts the book-keeping to increase number of samples in the buffer without /// copying any actual samples. @@ -139,7 +139,7 @@ public: /// \return Number of samples returned. virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples. uint maxSamples ///< How many samples to receive at max. - ); + ) override; /// Adjusts book-keeping so that given number of samples are removed from beginning of the /// sample buffer without copying them anywhere. @@ -147,10 +147,10 @@ public: /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly /// with 'ptrBegin' function. virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe. - ); + ) override; /// Returns number of samples currently available. - virtual uint numSamples() const; + virtual uint numSamples() const override; /// Sets number of channels, 1 = mono, 2 = stereo. void setChannels(int numChannels); @@ -162,14 +162,14 @@ public: } /// Returns nonzero if there aren't any samples available for outputting. - virtual int isEmpty() const; + virtual int isEmpty() const override; /// Clears all the samples. - virtual void clear(); + virtual void clear() override; /// allow trimming (downwards) amount of samples in pipeline. /// Returns adjusted amount of samples - uint adjustAmountOfSamples(uint numSamples); + uint adjustAmountOfSamples(uint numSamples) override; /// Add silence to end of buffer void addSilent(uint nSamples); diff --git a/3rdparty/soundtouch/soundtouch/FIFOSamplePipe.h b/3rdparty/soundtouch/soundtouch/FIFOSamplePipe.h index 3def42d1ab..8d415a00a7 100644 --- a/3rdparty/soundtouch/soundtouch/FIFOSamplePipe.h +++ b/3rdparty/soundtouch/soundtouch/FIFOSamplePipe.h @@ -164,7 +164,7 @@ protected: } /// Destructor. - virtual ~FIFOProcessor() + virtual ~FIFOProcessor() override { } @@ -175,7 +175,7 @@ protected: /// When using this function to output samples, also remember to 'remove' the /// output samples from the buffer by calling the /// 'receiveSamples(numSamples)' function - virtual SAMPLETYPE *ptrBegin() + virtual SAMPLETYPE *ptrBegin() override { return output->ptrBegin(); } @@ -189,7 +189,7 @@ public: /// \return Number of samples returned. virtual uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples. uint maxSamples ///< How many samples to receive at max. - ) + ) override { return output->receiveSamples(outBuffer, maxSamples); } @@ -200,26 +200,26 @@ public: /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly /// with 'ptrBegin' function. virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe. - ) + ) override { return output->receiveSamples(maxSamples); } /// Returns number of samples currently available. - virtual uint numSamples() const + virtual uint numSamples() const override { return output->numSamples(); } /// Returns nonzero if there aren't any samples available for outputting. - virtual int isEmpty() const + virtual int isEmpty() const override { return output->isEmpty(); } /// allow trimming (downwards) amount of samples in pipeline. /// Returns adjusted amount of samples - virtual uint adjustAmountOfSamples(uint numSamples) + virtual uint adjustAmountOfSamples(uint numSamples) override { return output->adjustAmountOfSamples(numSamples); } diff --git a/3rdparty/soundtouch/soundtouch/SoundTouch.h b/3rdparty/soundtouch/soundtouch/SoundTouch.h index f5cc5d6bec..850b9c7591 100644 --- a/3rdparty/soundtouch/soundtouch/SoundTouch.h +++ b/3rdparty/soundtouch/soundtouch/SoundTouch.h @@ -209,7 +209,7 @@ protected : public: SoundTouch(); - virtual ~SoundTouch(); + virtual ~SoundTouch() override; /// Get SoundTouch library version string static const char *getVersionString(); @@ -287,7 +287,7 @@ public: uint numSamples ///< Number of samples in buffer. Notice ///< that in case of stereo-sound a single sample ///< contains data for both channels. - ); + ) override; /// Output samples from beginning of the sample buffer. Copies requested samples to /// output buffer and removes them from the sample buffer. If there are less than @@ -296,7 +296,7 @@ public: /// \return Number of samples returned. virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples. uint maxSamples ///< How many samples to receive at max. - ); + ) override; /// Adjusts book-keeping so that given number of samples are removed from beginning of the /// sample buffer without copying them anywhere. @@ -304,11 +304,11 @@ public: /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly /// with 'ptrBegin' function. virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe. - ); + ) override; /// Clears all the samples in the object's output and internal processing /// buffers. - virtual void clear(); + virtual void clear() override; /// Changes a setting controlling the processing system behaviour. See the /// 'SETTING_...' defines for available setting ID's. diff --git a/3rdparty/soundtouch/source/SoundTouch/FIRFilter.h b/3rdparty/soundtouch/source/SoundTouch/FIRFilter.h index 39c2cc7542..cc90feb4f3 100644 --- a/3rdparty/soundtouch/source/SoundTouch/FIRFilter.h +++ b/3rdparty/soundtouch/source/SoundTouch/FIRFilter.h @@ -106,12 +106,12 @@ public: short *filterCoeffsUnalign; short *filterCoeffsAlign; - virtual uint evaluateFilterStereo(short *dest, const short *src, uint numSamples) const; + virtual uint evaluateFilterStereo(short *dest, const short *src, uint numSamples) const override; public: FIRFilterMMX(); ~FIRFilterMMX(); - virtual void setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor); + virtual void setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor) override; }; #endif // SOUNDTOUCH_ALLOW_MMX @@ -125,12 +125,12 @@ public: float *filterCoeffsUnalign; float *filterCoeffsAlign; - virtual uint evaluateFilterStereo(float *dest, const float *src, uint numSamples) const; + virtual uint evaluateFilterStereo(float *dest, const float *src, uint numSamples) const override; public: FIRFilterSSE(); ~FIRFilterSSE(); - virtual void setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor); + virtual void setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor) override; }; #endif // SOUNDTOUCH_ALLOW_SSE diff --git a/3rdparty/soundtouch/source/SoundTouch/InterpolateCubic.h b/3rdparty/soundtouch/source/SoundTouch/InterpolateCubic.h index 481abd64bc..d7e9db6498 100644 --- a/3rdparty/soundtouch/source/SoundTouch/InterpolateCubic.h +++ b/3rdparty/soundtouch/source/SoundTouch/InterpolateCubic.h @@ -43,20 +43,20 @@ class InterpolateCubic : public TransposerBase protected: virtual int transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, - int &srcSamples); + int &srcSamples) override; virtual int transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, - int &srcSamples); + int &srcSamples) override; virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, - int &srcSamples); + int &srcSamples) override; double fract; public: InterpolateCubic(); - virtual void resetRegisters(); + virtual void resetRegisters() override; int getLatency() const { diff --git a/3rdparty/soundtouch/source/SoundTouch/InterpolateLinear.h b/3rdparty/soundtouch/source/SoundTouch/InterpolateLinear.h index ff362e84b1..c1aa8782f8 100644 --- a/3rdparty/soundtouch/source/SoundTouch/InterpolateLinear.h +++ b/3rdparty/soundtouch/source/SoundTouch/InterpolateLinear.h @@ -47,21 +47,21 @@ protected: virtual int transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, - int &srcSamples); + int &srcSamples) override; virtual int transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, - int &srcSamples); - virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples); + int &srcSamples) override; + virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples) override; public: InterpolateLinearInteger(); /// Sets new target rate. Normal rate = 1.0, smaller values represent slower /// rate, larger faster rates. - virtual void setRate(double newRate); + virtual void setRate(double newRate) override; - virtual void resetRegisters(); + virtual void resetRegisters() override; - int getLatency() const + int getLatency() const override { return 0; } @@ -87,7 +87,7 @@ public: virtual void resetRegisters(); - int getLatency() const + int getLatency() const override { return 0; } diff --git a/3rdparty/soundtouch/source/SoundTouch/InterpolateShannon.h b/3rdparty/soundtouch/source/SoundTouch/InterpolateShannon.h index 72ab0b526d..332059df42 100644 --- a/3rdparty/soundtouch/source/SoundTouch/InterpolateShannon.h +++ b/3rdparty/soundtouch/source/SoundTouch/InterpolateShannon.h @@ -48,20 +48,20 @@ class InterpolateShannon : public TransposerBase protected: int transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, - int &srcSamples); + int &srcSamples) override; int transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, - int &srcSamples); + int &srcSamples) override; int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, - int &srcSamples); + int &srcSamples) override; double fract; public: InterpolateShannon(); - void resetRegisters(); + void resetRegisters() override; int getLatency() const { diff --git a/3rdparty/soundtouch/source/SoundTouch/RateTransposer.h b/3rdparty/soundtouch/source/SoundTouch/RateTransposer.h index 59381fab5f..bd02eff13f 100644 --- a/3rdparty/soundtouch/source/SoundTouch/RateTransposer.h +++ b/3rdparty/soundtouch/source/SoundTouch/RateTransposer.h @@ -124,7 +124,7 @@ protected: public: RateTransposer(); - virtual ~RateTransposer(); + virtual ~RateTransposer() override; /// Returns the output buffer object FIFOSamplePipe *getOutput() { return &outputBuffer; }; @@ -147,13 +147,13 @@ public: /// Adds 'numSamples' pcs of samples from the 'samples' memory position into /// the input of the object. - void putSamples(const SAMPLETYPE *samples, uint numSamples); + void putSamples(const SAMPLETYPE *samples, uint numSamples) override; /// Clears all the samples in the object - void clear(); + void clear() override; /// Returns nonzero if there aren't any samples available for outputting. - int isEmpty() const; + int isEmpty() const override; /// Return approximate initial input-output latency int getLatency() const; diff --git a/3rdparty/soundtouch/source/SoundTouch/TDStretch.h b/3rdparty/soundtouch/source/SoundTouch/TDStretch.h index 3ef79c7cdf..9062d3deb3 100644 --- a/3rdparty/soundtouch/source/SoundTouch/TDStretch.h +++ b/3rdparty/soundtouch/source/SoundTouch/TDStretch.h @@ -165,7 +165,7 @@ protected: public: TDStretch(); - virtual ~TDStretch(); + virtual ~TDStretch() override; /// Operator 'new' is overloaded so that it automatically creates a suitable instance /// depending on if we've a MMX/SSE/etc-capable CPU available or not. @@ -187,7 +187,7 @@ public: void setTempo(double newTempo); /// Returns nonzero if there aren't any samples available for outputting. - virtual void clear(); + virtual void clear() override; /// Clears the input buffer void clearInput(); @@ -227,7 +227,7 @@ public: const SAMPLETYPE *samples, ///< Input sample data uint numSamples ///< Number of samples in 'samples' so that one sample ///< contains both channels if stereo - ); + ) override; /// return nominal input sample requirement for triggering a processing batch int getInputSampleReq() const @@ -256,10 +256,10 @@ public: class TDStretchMMX : public TDStretch { protected: - double calcCrossCorr(const short *mixingPos, const short *compare, double &norm); - double calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm); - virtual void overlapStereo(short *output, const short *input) const; - virtual void clearCrossCorrState(); + double calcCrossCorr(const short *mixingPos, const short *compare, double &norm) override; + double calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm) override; + virtual void overlapStereo(short *output, const short *input) const override; + virtual void clearCrossCorrState() override; }; #endif /// SOUNDTOUCH_ALLOW_MMX @@ -269,8 +269,8 @@ public: class TDStretchSSE : public TDStretch { protected: - double calcCrossCorr(const float *mixingPos, const float *compare, double &norm); - double calcCrossCorrAccumulate(const float *mixingPos, const float *compare, double &norm); + double calcCrossCorr(const float *mixingPos, const float *compare, double &norm) override; + double calcCrossCorrAccumulate(const float *mixingPos, const float *compare, double &norm) override; }; #endif /// SOUNDTOUCH_ALLOW_SSE