summaryrefslogtreecommitdiff
path: root/Externals/soundtouch/mmx_optimized.cpp
diff options
context:
space:
mode:
authorget <45425365+Minty-Meeo@users.noreply.github.com>2023-03-24 16:20:21 -0500
committerget <45425365+Minty-Meeo@users.noreply.github.com>2023-03-31 20:11:58 -0500
commit4e3a366b2d861e4a74136705643e5d43912552a5 (patch)
tree0ae71cbc8a87f92efd047f26e0bbddf32e74b4eb /Externals/soundtouch/mmx_optimized.cpp
parent7de01597c6e3cc108c943a458e5c2b4d210602ef (diff)
Update SoundTouch to 2.3.2 commit 1eda9c0b01039f29d230a46cda9f2290bbd1f62b
Diffstat (limited to 'Externals/soundtouch/mmx_optimized.cpp')
-rw-r--r--Externals/soundtouch/mmx_optimized.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/Externals/soundtouch/mmx_optimized.cpp b/Externals/soundtouch/mmx_optimized.cpp
index 8ad2811b9a..0a2949cd35 100644
--- a/Externals/soundtouch/mmx_optimized.cpp
+++ b/Externals/soundtouch/mmx_optimized.cpp
@@ -20,13 +20,6 @@
///
////////////////////////////////////////////////////////////////////////////////
//
-// Last changed : $Date: 2015-08-09 00:00:15 +0300 (Sun, 09 Aug 2015) $
-// File revision : $Revision: 4 $
-//
-// $Id: mmx_optimized.cpp 226 2015-08-08 21:00:15Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
// License :
//
// SoundTouch audio processing library
@@ -125,7 +118,12 @@ double TDStretchMMX::calcCrossCorr(const short *pV1, const short *pV2, double &d
if (norm > (long)maxnorm)
{
- maxnorm = norm;
+ // modify 'maxnorm' inside critical section to avoid multi-access conflict if in OpenMP mode
+ #pragma omp critical
+ if (norm > (long)maxnorm)
+ {
+ maxnorm = norm;
+ }
}
// Normalize result by dividing by sqrt(norm) - this step is easiest
@@ -219,7 +217,6 @@ void TDStretchMMX::clearCrossCorrState()
}
-
// MMX-optimized version of the function overlapStereo
void TDStretchMMX::overlapStereo(short *output, const short *input) const
{
@@ -297,8 +294,8 @@ void TDStretchMMX::overlapStereo(short *output, const short *input) const
FIRFilterMMX::FIRFilterMMX() : FIRFilter()
{
- filterCoeffsAlign = NULL;
- filterCoeffsUnalign = NULL;
+ filterCoeffsAlign = nullptr;
+ filterCoeffsUnalign = nullptr;
}
@@ -335,7 +332,6 @@ void FIRFilterMMX::setCoefficients(const short *coeffs, uint newLength, uint uRe
}
-
// mmx-optimized version of the filter routine for stereo sound
uint FIRFilterMMX::evaluateFilterStereo(short *dest, const short *src, uint numSamples) const
{
@@ -392,4 +388,9 @@ uint FIRFilterMMX::evaluateFilterStereo(short *dest, const short *src, uint numS
return (numSamples & 0xfffffffe) - length;
}
+#else
+
+// workaround to not complain about empty module
+bool _dontcomplain_mmx_empty;
+
#endif // SOUNDTOUCH_ALLOW_MMX