mirror of
https://github.com/RPCS3/soundtouch.git
synced 2024-11-08 20:12:27 +01:00
Merge pull request 'Add 'override' keyword' (#3) from vestral/soundtouch:override into master
Reviewed-on: https://codeberg.org/soundtouch/soundtouch/pulls/3
This commit is contained in:
commit
64760eb34e
@ -91,7 +91,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// destructor
|
/// destructor
|
||||||
~FIFOSampleBuffer();
|
~FIFOSampleBuffer() override;
|
||||||
|
|
||||||
/// Returns a pointer to the beginning of the output samples.
|
/// Returns a pointer to the beginning of the output samples.
|
||||||
/// This function is provided for accessing the output samples directly.
|
/// 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
|
/// When using this function to output samples, also remember to 'remove' the
|
||||||
/// output samples from the buffer by calling the
|
/// output samples from the buffer by calling the
|
||||||
/// 'receiveSamples(numSamples)' function
|
/// '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.
|
/// 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
|
/// where the new samples are to be inserted). This function may be used for
|
||||||
@ -121,7 +121,7 @@ public:
|
|||||||
/// the sample buffer.
|
/// the sample buffer.
|
||||||
virtual void putSamples(const SAMPLETYPE *samples, ///< Pointer to samples.
|
virtual void putSamples(const SAMPLETYPE *samples, ///< Pointer to samples.
|
||||||
uint numSamples ///< Number of samples to insert.
|
uint numSamples ///< Number of samples to insert.
|
||||||
);
|
) override;
|
||||||
|
|
||||||
/// Adjusts the book-keeping to increase number of samples in the buffer without
|
/// Adjusts the book-keeping to increase number of samples in the buffer without
|
||||||
/// copying any actual samples.
|
/// copying any actual samples.
|
||||||
@ -139,7 +139,7 @@ public:
|
|||||||
/// \return Number of samples returned.
|
/// \return Number of samples returned.
|
||||||
virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
|
virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
|
||||||
uint maxSamples ///< How many samples to receive at max.
|
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
|
/// Adjusts book-keeping so that given number of samples are removed from beginning of the
|
||||||
/// sample buffer without copying them anywhere.
|
/// 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
|
/// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
|
||||||
/// with 'ptrBegin' function.
|
/// with 'ptrBegin' function.
|
||||||
virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
|
virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
|
||||||
);
|
) override;
|
||||||
|
|
||||||
/// Returns number of samples currently available.
|
/// Returns number of samples currently available.
|
||||||
virtual uint numSamples() const;
|
virtual uint numSamples() const override;
|
||||||
|
|
||||||
/// Sets number of channels, 1 = mono, 2 = stereo.
|
/// Sets number of channels, 1 = mono, 2 = stereo.
|
||||||
void setChannels(int numChannels);
|
void setChannels(int numChannels);
|
||||||
@ -162,14 +162,14 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns nonzero if there aren't any samples available for outputting.
|
/// Returns nonzero if there aren't any samples available for outputting.
|
||||||
virtual int isEmpty() const;
|
virtual int isEmpty() const override;
|
||||||
|
|
||||||
/// Clears all the samples.
|
/// Clears all the samples.
|
||||||
virtual void clear();
|
virtual void clear() override;
|
||||||
|
|
||||||
/// allow trimming (downwards) amount of samples in pipeline.
|
/// allow trimming (downwards) amount of samples in pipeline.
|
||||||
/// Returns adjusted amount of samples
|
/// Returns adjusted amount of samples
|
||||||
uint adjustAmountOfSamples(uint numSamples);
|
uint adjustAmountOfSamples(uint numSamples) override;
|
||||||
|
|
||||||
/// Add silence to end of buffer
|
/// Add silence to end of buffer
|
||||||
void addSilent(uint nSamples);
|
void addSilent(uint nSamples);
|
||||||
|
@ -164,7 +164,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
virtual ~FIFOProcessor()
|
virtual ~FIFOProcessor() override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ protected:
|
|||||||
/// When using this function to output samples, also remember to 'remove' the
|
/// When using this function to output samples, also remember to 'remove' the
|
||||||
/// output samples from the buffer by calling the
|
/// output samples from the buffer by calling the
|
||||||
/// 'receiveSamples(numSamples)' function
|
/// 'receiveSamples(numSamples)' function
|
||||||
virtual SAMPLETYPE *ptrBegin()
|
virtual SAMPLETYPE *ptrBegin() override
|
||||||
{
|
{
|
||||||
return output->ptrBegin();
|
return output->ptrBegin();
|
||||||
}
|
}
|
||||||
@ -189,7 +189,7 @@ public:
|
|||||||
/// \return Number of samples returned.
|
/// \return Number of samples returned.
|
||||||
virtual uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples.
|
virtual uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples.
|
||||||
uint maxSamples ///< How many samples to receive at max.
|
uint maxSamples ///< How many samples to receive at max.
|
||||||
)
|
) override
|
||||||
{
|
{
|
||||||
return output->receiveSamples(outBuffer, maxSamples);
|
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
|
/// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
|
||||||
/// with 'ptrBegin' function.
|
/// with 'ptrBegin' function.
|
||||||
virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
|
virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
|
||||||
)
|
) override
|
||||||
{
|
{
|
||||||
return output->receiveSamples(maxSamples);
|
return output->receiveSamples(maxSamples);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns number of samples currently available.
|
/// Returns number of samples currently available.
|
||||||
virtual uint numSamples() const
|
virtual uint numSamples() const override
|
||||||
{
|
{
|
||||||
return output->numSamples();
|
return output->numSamples();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns nonzero if there aren't any samples available for outputting.
|
/// Returns nonzero if there aren't any samples available for outputting.
|
||||||
virtual int isEmpty() const
|
virtual int isEmpty() const override
|
||||||
{
|
{
|
||||||
return output->isEmpty();
|
return output->isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// allow trimming (downwards) amount of samples in pipeline.
|
/// allow trimming (downwards) amount of samples in pipeline.
|
||||||
/// Returns adjusted amount of samples
|
/// Returns adjusted amount of samples
|
||||||
virtual uint adjustAmountOfSamples(uint numSamples)
|
virtual uint adjustAmountOfSamples(uint numSamples) override
|
||||||
{
|
{
|
||||||
return output->adjustAmountOfSamples(numSamples);
|
return output->adjustAmountOfSamples(numSamples);
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ protected :
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
SoundTouch();
|
SoundTouch();
|
||||||
virtual ~SoundTouch();
|
virtual ~SoundTouch() override;
|
||||||
|
|
||||||
/// Get SoundTouch library version string
|
/// Get SoundTouch library version string
|
||||||
static const char *getVersionString();
|
static const char *getVersionString();
|
||||||
@ -287,7 +287,7 @@ public:
|
|||||||
uint numSamples ///< Number of samples in buffer. Notice
|
uint numSamples ///< Number of samples in buffer. Notice
|
||||||
///< that in case of stereo-sound a single sample
|
///< that in case of stereo-sound a single sample
|
||||||
///< contains data for both channels.
|
///< contains data for both channels.
|
||||||
);
|
) override;
|
||||||
|
|
||||||
/// Output samples from beginning of the sample buffer. Copies requested samples to
|
/// 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
|
/// output buffer and removes them from the sample buffer. If there are less than
|
||||||
@ -296,7 +296,7 @@ public:
|
|||||||
/// \return Number of samples returned.
|
/// \return Number of samples returned.
|
||||||
virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
|
virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
|
||||||
uint maxSamples ///< How many samples to receive at max.
|
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
|
/// Adjusts book-keeping so that given number of samples are removed from beginning of the
|
||||||
/// sample buffer without copying them anywhere.
|
/// 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
|
/// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
|
||||||
/// with 'ptrBegin' function.
|
/// with 'ptrBegin' function.
|
||||||
virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
|
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
|
/// Clears all the samples in the object's output and internal processing
|
||||||
/// buffers.
|
/// buffers.
|
||||||
virtual void clear();
|
virtual void clear() override;
|
||||||
|
|
||||||
/// Changes a setting controlling the processing system behaviour. See the
|
/// Changes a setting controlling the processing system behaviour. See the
|
||||||
/// 'SETTING_...' defines for available setting ID's.
|
/// 'SETTING_...' defines for available setting ID's.
|
||||||
|
@ -106,12 +106,12 @@ public:
|
|||||||
short *filterCoeffsUnalign;
|
short *filterCoeffsUnalign;
|
||||||
short *filterCoeffsAlign;
|
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:
|
public:
|
||||||
FIRFilterMMX();
|
FIRFilterMMX();
|
||||||
~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
|
#endif // SOUNDTOUCH_ALLOW_MMX
|
||||||
@ -125,12 +125,12 @@ public:
|
|||||||
float *filterCoeffsUnalign;
|
float *filterCoeffsUnalign;
|
||||||
float *filterCoeffsAlign;
|
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:
|
public:
|
||||||
FIRFilterSSE();
|
FIRFilterSSE();
|
||||||
~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
|
#endif // SOUNDTOUCH_ALLOW_SSE
|
||||||
|
@ -43,20 +43,20 @@ class InterpolateCubic : public TransposerBase
|
|||||||
protected:
|
protected:
|
||||||
virtual int transposeMono(SAMPLETYPE *dest,
|
virtual int transposeMono(SAMPLETYPE *dest,
|
||||||
const SAMPLETYPE *src,
|
const SAMPLETYPE *src,
|
||||||
int &srcSamples);
|
int &srcSamples) override;
|
||||||
virtual int transposeStereo(SAMPLETYPE *dest,
|
virtual int transposeStereo(SAMPLETYPE *dest,
|
||||||
const SAMPLETYPE *src,
|
const SAMPLETYPE *src,
|
||||||
int &srcSamples);
|
int &srcSamples) override;
|
||||||
virtual int transposeMulti(SAMPLETYPE *dest,
|
virtual int transposeMulti(SAMPLETYPE *dest,
|
||||||
const SAMPLETYPE *src,
|
const SAMPLETYPE *src,
|
||||||
int &srcSamples);
|
int &srcSamples) override;
|
||||||
|
|
||||||
double fract;
|
double fract;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InterpolateCubic();
|
InterpolateCubic();
|
||||||
|
|
||||||
virtual void resetRegisters();
|
virtual void resetRegisters() override;
|
||||||
|
|
||||||
int getLatency() const
|
int getLatency() const
|
||||||
{
|
{
|
||||||
|
@ -47,19 +47,19 @@ protected:
|
|||||||
|
|
||||||
virtual int transposeMono(SAMPLETYPE *dest,
|
virtual int transposeMono(SAMPLETYPE *dest,
|
||||||
const SAMPLETYPE *src,
|
const SAMPLETYPE *src,
|
||||||
int &srcSamples);
|
int &srcSamples) override;
|
||||||
virtual int transposeStereo(SAMPLETYPE *dest,
|
virtual int transposeStereo(SAMPLETYPE *dest,
|
||||||
const SAMPLETYPE *src,
|
const SAMPLETYPE *src,
|
||||||
int &srcSamples);
|
int &srcSamples) override;
|
||||||
virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples);
|
virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples) override;
|
||||||
public:
|
public:
|
||||||
InterpolateLinearInteger();
|
InterpolateLinearInteger();
|
||||||
|
|
||||||
/// Sets new target rate. Normal rate = 1.0, smaller values represent slower
|
/// Sets new target rate. Normal rate = 1.0, smaller values represent slower
|
||||||
/// rate, larger faster rates.
|
/// 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
|
||||||
{
|
{
|
||||||
|
@ -48,20 +48,20 @@ class InterpolateShannon : public TransposerBase
|
|||||||
protected:
|
protected:
|
||||||
int transposeMono(SAMPLETYPE *dest,
|
int transposeMono(SAMPLETYPE *dest,
|
||||||
const SAMPLETYPE *src,
|
const SAMPLETYPE *src,
|
||||||
int &srcSamples);
|
int &srcSamples) override;
|
||||||
int transposeStereo(SAMPLETYPE *dest,
|
int transposeStereo(SAMPLETYPE *dest,
|
||||||
const SAMPLETYPE *src,
|
const SAMPLETYPE *src,
|
||||||
int &srcSamples);
|
int &srcSamples) override;
|
||||||
int transposeMulti(SAMPLETYPE *dest,
|
int transposeMulti(SAMPLETYPE *dest,
|
||||||
const SAMPLETYPE *src,
|
const SAMPLETYPE *src,
|
||||||
int &srcSamples);
|
int &srcSamples) override;
|
||||||
|
|
||||||
double fract;
|
double fract;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InterpolateShannon();
|
InterpolateShannon();
|
||||||
|
|
||||||
void resetRegisters();
|
void resetRegisters() override;
|
||||||
|
|
||||||
int getLatency() const
|
int getLatency() const
|
||||||
{
|
{
|
||||||
|
@ -124,7 +124,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
RateTransposer();
|
RateTransposer();
|
||||||
virtual ~RateTransposer();
|
virtual ~RateTransposer() override;
|
||||||
|
|
||||||
/// Returns the output buffer object
|
/// Returns the output buffer object
|
||||||
FIFOSamplePipe *getOutput() { return &outputBuffer; };
|
FIFOSamplePipe *getOutput() { return &outputBuffer; };
|
||||||
@ -147,13 +147,13 @@ public:
|
|||||||
|
|
||||||
/// Adds 'numSamples' pcs of samples from the 'samples' memory position into
|
/// Adds 'numSamples' pcs of samples from the 'samples' memory position into
|
||||||
/// the input of the object.
|
/// 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
|
/// Clears all the samples in the object
|
||||||
void clear();
|
void clear() override;
|
||||||
|
|
||||||
/// Returns nonzero if there aren't any samples available for outputting.
|
/// Returns nonzero if there aren't any samples available for outputting.
|
||||||
int isEmpty() const;
|
int isEmpty() const override;
|
||||||
|
|
||||||
/// Return approximate initial input-output latency
|
/// Return approximate initial input-output latency
|
||||||
int getLatency() const;
|
int getLatency() const;
|
||||||
|
@ -165,7 +165,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
TDStretch();
|
TDStretch();
|
||||||
virtual ~TDStretch();
|
virtual ~TDStretch() override;
|
||||||
|
|
||||||
/// Operator 'new' is overloaded so that it automatically creates a suitable instance
|
/// 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.
|
/// depending on if we've a MMX/SSE/etc-capable CPU available or not.
|
||||||
@ -187,7 +187,7 @@ public:
|
|||||||
void setTempo(double newTempo);
|
void setTempo(double newTempo);
|
||||||
|
|
||||||
/// Returns nonzero if there aren't any samples available for outputting.
|
/// Returns nonzero if there aren't any samples available for outputting.
|
||||||
virtual void clear();
|
virtual void clear() override;
|
||||||
|
|
||||||
/// Clears the input buffer
|
/// Clears the input buffer
|
||||||
void clearInput();
|
void clearInput();
|
||||||
@ -227,7 +227,7 @@ public:
|
|||||||
const SAMPLETYPE *samples, ///< Input sample data
|
const SAMPLETYPE *samples, ///< Input sample data
|
||||||
uint numSamples ///< Number of samples in 'samples' so that one sample
|
uint numSamples ///< Number of samples in 'samples' so that one sample
|
||||||
///< contains both channels if stereo
|
///< contains both channels if stereo
|
||||||
);
|
) override;
|
||||||
|
|
||||||
/// return nominal input sample requirement for triggering a processing batch
|
/// return nominal input sample requirement for triggering a processing batch
|
||||||
int getInputSampleReq() const
|
int getInputSampleReq() const
|
||||||
@ -256,10 +256,10 @@ public:
|
|||||||
class TDStretchMMX : public TDStretch
|
class TDStretchMMX : public TDStretch
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
double calcCrossCorr(const short *mixingPos, const short *compare, double &norm);
|
double calcCrossCorr(const short *mixingPos, const short *compare, double &norm) override;
|
||||||
double calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm);
|
double calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm) override;
|
||||||
virtual void overlapStereo(short *output, const short *input) const;
|
virtual void overlapStereo(short *output, const short *input) const override;
|
||||||
virtual void clearCrossCorrState();
|
virtual void clearCrossCorrState() override;
|
||||||
};
|
};
|
||||||
#endif /// SOUNDTOUCH_ALLOW_MMX
|
#endif /// SOUNDTOUCH_ALLOW_MMX
|
||||||
|
|
||||||
@ -269,8 +269,8 @@ public:
|
|||||||
class TDStretchSSE : public TDStretch
|
class TDStretchSSE : public TDStretch
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
double calcCrossCorr(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);
|
double calcCrossCorrAccumulate(const float *mixingPos, const float *compare, double &norm) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /// SOUNDTOUCH_ALLOW_SSE
|
#endif /// SOUNDTOUCH_ALLOW_SSE
|
||||||
|
Loading…
Reference in New Issue
Block a user