diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f94e3b..caa04d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ if(MSVC) set(COMPILE_DEFINITIONS /O2 /fp:fast) set(COMPILE_OPTIONS ) else() - set(COMPILE_OPTIONS -Ofast -Wall -Wno-unknown-pragmas) + set(COMPILE_OPTIONS -Ofast -Wall -Wextra -Wno-unknown-pragmas) endif() ##################### diff --git a/source/SoundStretch/WavFile.cpp b/source/SoundStretch/WavFile.cpp index 539edd2..52efb1d 100644 --- a/source/SoundStretch/WavFile.cpp +++ b/source/SoundStretch/WavFile.cpp @@ -123,7 +123,7 @@ static const char dataStr[] = "data"; } // dummy helper-function - static inline void _swap16Buffer(short *pData, int numBytes) + static inline void _swap16Buffer(short *, int) { // do nothing } diff --git a/source/SoundStretch/WavFile.h b/source/SoundStretch/WavFile.h index b0f4d96..61a174e 100644 --- a/source/SoundStretch/WavFile.h +++ b/source/SoundStretch/WavFile.h @@ -118,9 +118,6 @@ private: /// File pointer. FILE *fptr; - /// Position within the audio stream - long position; - /// Counter of how many bytes of sample data have been read from the file. long dataRead; diff --git a/source/SoundTouch/FIRFilter.cpp b/source/SoundTouch/FIRFilter.cpp index 478b3b6..edfeb41 100644 --- a/source/SoundTouch/FIRFilter.cpp +++ b/source/SoundTouch/FIRFilter.cpp @@ -273,7 +273,7 @@ uint FIRFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSample // Operator 'new' is overloaded so that it automatically creates a suitable instance // depending on if we've a MMX-capable CPU available or not. -void * FIRFilter::operator new(size_t s) +void * FIRFilter::operator new(size_t) { // Notice! don't use "new FIRFilter" directly, use "newInstance" to create a new instance instead! ST_THROW_RT_ERROR("Error in FIRFilter::new: Don't use 'new FIRFilter', use 'newInstance' member instead!"); diff --git a/source/SoundTouch/InterpolateCubic.h b/source/SoundTouch/InterpolateCubic.h index 251c23f..64faf64 100644 --- a/source/SoundTouch/InterpolateCubic.h +++ b/source/SoundTouch/InterpolateCubic.h @@ -58,7 +58,7 @@ public: virtual void resetRegisters() override; - int getLatency() const + virtual int getLatency() const override { return 1; } diff --git a/source/SoundTouch/InterpolateLinear.h b/source/SoundTouch/InterpolateLinear.h index 6104fae..8034d76 100644 --- a/source/SoundTouch/InterpolateLinear.h +++ b/source/SoundTouch/InterpolateLinear.h @@ -61,7 +61,7 @@ public: virtual void resetRegisters() override; - int getLatency() const + virtual int getLatency() const override { return 0; } diff --git a/source/SoundTouch/InterpolateShannon.cpp b/source/SoundTouch/InterpolateShannon.cpp index 1d69a2e..8d97613 100644 --- a/source/SoundTouch/InterpolateShannon.cpp +++ b/source/SoundTouch/InterpolateShannon.cpp @@ -171,9 +171,9 @@ int InterpolateShannon::transposeStereo(SAMPLETYPE *pdest, /// Transpose stereo audio. Returns number of produced output samples, and /// updates "srcSamples" to amount of consumed source samples -int InterpolateShannon::transposeMulti(SAMPLETYPE *pdest, - const SAMPLETYPE *psrc, - int &srcSamples) +int InterpolateShannon::transposeMulti(SAMPLETYPE *, + const SAMPLETYPE *, + int &) { // not implemented assert(false); diff --git a/source/SoundTouch/InterpolateShannon.h b/source/SoundTouch/InterpolateShannon.h index 75876e1..e0c6fa5 100644 --- a/source/SoundTouch/InterpolateShannon.h +++ b/source/SoundTouch/InterpolateShannon.h @@ -63,7 +63,7 @@ public: void resetRegisters() override; - int getLatency() const + virtual int getLatency() const override { return 3; } diff --git a/source/SoundTouch/TDStretch.cpp b/source/SoundTouch/TDStretch.cpp index 243f7cc..e416a3a 100644 --- a/source/SoundTouch/TDStretch.cpp +++ b/source/SoundTouch/TDStretch.cpp @@ -54,25 +54,6 @@ using namespace soundtouch; #define max(x, y) (((x) > (y)) ? (x) : (y)) -/***************************************************************************** - * - * Constant definitions - * - *****************************************************************************/ - -// Table for the hierarchical mixing position seeking algorithm -const short _scanOffsets[5][24]={ - { 124, 186, 248, 310, 372, 434, 496, 558, 620, 682, 744, 806, - 868, 930, 992, 1054, 1116, 1178, 1240, 1302, 1364, 1426, 1488, 0}, - {-100, -75, -50, -25, 25, 50, 75, 100, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - { -20, -15, -10, -5, 5, 10, 15, 20, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - { -4, -3, -2, -1, 1, 2, 3, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - { 121, 114, 97, 114, 98, 105, 108, 32, 104, 99, 117, 111, - 116, 100, 110, 117, 111, 115, 0, 0, 0, 0, 0, 0}}; - /***************************************************************************** * * Implementation of the class 'TDStretch' @@ -759,7 +740,7 @@ void TDStretch::acceptNewOverlapLength(int newOverlapLength) // 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. -void * TDStretch::operator new(size_t s) +void * TDStretch::operator new(size_t) { // Notice! don't use "new TDStretch" directly, use "newInstance" to create a new instance instead! ST_THROW_RT_ERROR("Error in TDStretch::new: Don't use 'new TDStretch' directly, use 'newInstance' member instead!");