Commit 296bdb71 authored by Alessio Treglia's avatar Alessio Treglia

Imported Upstream version 1.7.1

parent 1ef71a9b
......@@ -15,7 +15,7 @@
</head>
<body class="normal">
<hr>
<h1>SoundTouch audio processing library v1.7.0</h1>
<h1>SoundTouch audio processing library v1.7.1</h1>
<p class="normal">SoundTouch library Copyright © Olli Parviainen 2001-2012 </p>
<hr>
<h2>1. Introduction </h2>
......@@ -133,9 +133,24 @@ directly and remove the following definition:<blockquote>
<pre>#define SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS 1</pre>
</blockquote>
<h4><b>2.2.3 Compiling Shared Library / DLL version</b></h4>
<p>
The GNU compilation does not automatically create a shared-library version of
SoundTouch (.so or .dll). If such is desired, then you can create it as follows
after running the usual compilation:</p>
<blockquote>
<pre>g++ -shared -static -DDLL_EXPORTS -I../../include -o SoundTouch.dll \
SoundTouchDLL.cpp ../SoundTouch/.libs/libSoundTouch.a
sstrip SoundTouch.dll</pre>
</blockquote>
<h3>2.1. Building in Android</h3>
<p>Android compilation instructions are within the
source code package, see file &quot;<b>source/Android-lib/README-SoundTouch-Android.html</b>&quot;
in the package.</p>
<hr>
<h2>3. About implementation &amp; Usage tips</h2>
<h3>3.1. Supported sample data formats</h3>
<h2>3. About implementation &amp; Usage tips <h3>3.1. Supported sample data formats</h3>
<p>The sample data format can be chosen between 16bit signed integer
and 32bit floating point values, the default is 32bit floating point. </p>
<p> In Windows environment, the sample data format is chosen in file
......@@ -498,9 +513,13 @@ and estimates the BPM rate:</p>
<hr>
<h2>5. Change History</h2>
<h3>5.1. SoundTouch library Change History </h3>
<p><b>1.7.1:</b></p>
<ul>
<li>Added files for Android compilation
</ul>
<p><b>1.7.0:</b></p>
<ul>
<li>Sound quality improvements</li>
<li>Sound quality improvements/li>
<li>Improved flush() to adjust output sound stream duration to match better with
ideal duration</li>
<li>Rewrote x86 cpu feature check to resolve compatibility problems</li>
......@@ -701,25 +720,39 @@ switch "-bpm" </li>
<p>Kudos for these people who have contributed to development or
submitted bugfixes since SoundTouch v1.3.1: </p>
<ul>
<li> Arthur A </li>
<li> Richard Ash </li>
<li> Stanislav Brabec </li>
<li> Christian Budde </li>
<li> Brian Cameron </li>
<li> Jason Champion </li>
<li> Arthur A</li>
<li> Richard Ash</li>
<li> Stanislav Brabec</li>
<li> Christian Budde</li>
<li> Jacek Caban</li>
<li> Brian Cameron</li>
<li> Jason Champion</li>
<li> David Clark</li>
<li> Patrick Colis</li>
<li> Miquel Colon</li>
<li> Justin Frankel</li>
<li> Jason Garland</li>
<li> Takashi Iwai</li>
<li> Yuval Naveh</li>
<li> Paulo Pizarro</li>
<li> Blaise Potard</li>
<li> RJ Ryan</li>
<li> Patrick Colis </li>
<li> Miquel Colon </li>
<li> Sandro Cumerlato</li>
<li> Justin Frankel </li>
<li> Jason Garland </li>
<li> Takashi Iwai </li>
<li> Mathias Möhl</li>
<li> Yuval Naveh </li>
<li> Paulo Pizarro </li>
<li> Blaise Potard</li>
<li> Blaise Potard</li>
<li> RJ Ryan </li>
<li> John Sheehy</li>
<li> Tim Shuttleworth</li>
<li> Katja Vetter</li>
<li> Tim Shuttleworth</li>
<li> John Stumpo</li>
<li> Tim Shuttleworth</li>
<li> Katja Vetter</li>
</ul>
<p>Moral greetings to all other contributors and users also!</p>
<hr>
......@@ -736,8 +769,9 @@ General Public License for more details.</p>
<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
<hr><!--
$Id: README.html 152 2012-09-01 07:43:51Z oparviai $
-->
<hr><!--
$Id: README.html 168 2012-12-28 20:55:19Z oparviai $ -->
<p>
<i>RREADME.html file updated on 28-Dec-2012</i></p>
</body>
</html>
......
......@@ -8,10 +8,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date: 2012-04-01 20:01:42 +0300 (Sun, 01 Apr 2012) $
// Last changed : $Date: 2012-12-28 16:53:56 +0200 (Fri, 28 Dec 2012) $
// File revision : $Revision: 3 $
//
// $Id: STTypes.h 136 2012-04-01 17:01:42Z oparviai $
// $Id: STTypes.h 162 2012-12-28 14:53:56Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
......@@ -42,8 +42,21 @@
typedef unsigned int uint;
typedef unsigned long ulong;
#ifdef __GNUC__
// In GCC, include soundtouch_config.h made by config scritps
// Patch for MinGW: on Win64 long is 32-bit
#ifdef _WIN64
typedef unsigned long long ulongptr;
#else
typedef ulong ulongptr;
#endif
// Helper macro for aligning pointer up to next 16-byte boundary
#define SOUNDTOUCH_ALIGN_POINTER_16(x) ( ( (ulongptr)(x) + 15 ) & ~(ulongptr)15 )
#if (defined(__GNUC__) && !defined(ANDROID))
// In GCC, include soundtouch_config.h made by config scritps.
// Skip this in Android compilation that uses GCC but without configure scripts.
#include "soundtouch_config.h"
#endif
......@@ -65,6 +78,13 @@ namespace soundtouch
//#undef SOUNDTOUCH_INTEGER_SAMPLES
//#undef SOUNDTOUCH_FLOAT_SAMPLES
#if (defined(__SOFTFP__))
// For Android compilation: Force use of Integer samples in case that
// compilation uses soft-floating point emulation - soft-fp is way too slow
#undef SOUNDTOUCH_FLOAT_SAMPLES
#define SOUNDTOUCH_INTEGER_SAMPLES 1
#endif
#if !(SOUNDTOUCH_INTEGER_SAMPLES || SOUNDTOUCH_FLOAT_SAMPLES)
/// Choose either 32bit floating point or 16bit integer sampletype
......
......@@ -41,10 +41,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date: 2012-04-04 22:47:28 +0300 (Wed, 04 Apr 2012) $
// Last changed : $Date: 2012-12-28 21:32:59 +0200 (Fri, 28 Dec 2012) $
// File revision : $Revision: 4 $
//
// $Id: SoundTouch.h 141 2012-04-04 19:47:28Z oparviai $
// $Id: SoundTouch.h 163 2012-12-28 19:32:59Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
......@@ -79,10 +79,10 @@ namespace soundtouch
{
/// Soundtouch library version string
#define SOUNDTOUCH_VERSION "1.7.0"
#define SOUNDTOUCH_VERSION "1.7.1"
/// SoundTouch library version id
#define SOUNDTOUCH_VERSION_ID (10700)
#define SOUNDTOUCH_VERSION_ID (10701)
//
// Available setting IDs for the 'setSetting' & 'get_setting' functions:
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SoundTouch in Android</title>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<meta name="author" content="Olli Parviainen">
<meta name="description"
content="Readme file for SoundTouch library Android compilation">
<style> <!-- .normal { font-family: Arial }
--></style>
</head>
<body class="normal">
<hr>
<h1>SoundTouch in Android</h1>
<hr>
<h2>Compiling SoundTouch for Android</h2>
<p>SoundTouch source code package contains &quot;Android-lib&quot; example project that compiles SoundTouch
source codes into Android native library, and gives an example of JNI interface
for invoking
the native SoundTouch routines from an Android application written in Java.</p>
<p style="font-weight: 700">Software prerequisites:</p>
<ul>
<li>Android SDK environment for developing your own Android application. Visit the <a href="http://developer.android.com/index.html">Android developers' site</a>
for more information about the Android SDK and developing Android applications.</li>
<li>Android NDK compiler kit for compiling native library binaries. The Android NDK
is <a href="http://developer.android.com/tools/sdk/ndk/index.html">
available for download</a> at the Android developer tools site.</li>
<li>In case you're working in Windows environment, install
<a href="http://cygwin.com/install.html">
Cygwin</a> to run the Android NDK/SDK compiler scripts</li>
<li>Latest SoundTouch source code package available at <a href="http://soundtouch.surina.net/sourcecode.html">
soundtouch.surina.net</a>.</li>
</ul>
<p><b>Hint: </b>As installing and configuring all the components for an Android SDK/NDK
environment requires fair effort, it&#39;s good idea to create a dedicated Virtual
Machine environment for the Android development environment installation.
Having the Android developer environment setup in dedicated Virtual Machine
allows keeping all these settings isolated from your other PC operations, and
eases taking backup snapshots of your full development environment.</p>
<p><b>Compiling</b></p>
<p>
To compile the SoundTouch library source codes into an Android native library,
open Cygwin/bash shell, go to directory <b>&quot;soundtouch/source/Android-lib/jni&quot;</b> and invoke the NDK
compiler with following command:</p>
<pre> $NDK/ndk-build</pre>
<p>This will build the ARMv5 and ARMv7 versions of SoundTouch library (including
also the example JNI
interface, see below) into the &quot;libs&quot; subdirectory.</p>
<p>Notice that to allow Cygwin/bash to locate the NDK compile scripts, you
need to define the location of the NDK installation defined in environment
variable &quot;NDK&quot;. That's easiest done by adding the NDK path definition at end of
your <b>~/.bash_profile</b> file, for instance as follows:</p>
<pre> NDK=/cygdrive/d/Android/android-ndk-r6</pre>
<hr />
<h2>
Android floating-point performance considerations</h2>
<p>
Default build target for
Android NDK is ARMv5 CPU generation, as that works in
all ARM-based Android devices.<p>
This has a pitfall though: For ideal sound quality SoundTouch should be compiled
to use floating-point algorithms, however, all low-end Android devices do not
have floating-point hardware in their CPUs, and hence the default ARMv5 compilation uses software-emulation for floating-point calculations instead of
hardware floating-point to allow running the binary executables also in low-end devices.<p>
The floating point software-emulation is however several tens of times slower
than real hardware-level floating-point calculations, making
floating-point-intensive applications such as SoundTouch infeasible with low-end
devices.<p>
As workaround, the SoundTouch Android compilation builds two separate versions
of the library:<ul>
<li>ARMv5 version that compiles SoundTouch using integer algorithm version. The integer
algorithm version compromises the sound quality but provides good performance also
with low-end
devices without hardware floating-point support in the CPU level.</li>
<li>ARMv7 version that compiles SoundTouch using hardware floating-point algorithms.
These algorithms provide ideal sound quality yet do not work in simpler CPU
models.</li>
</ul>
<p>
These two library compilations are already defined in file &quot;<b>jni/Application.mk</b>&quot;
so that these two separate library targets are automatically built under the &quot;<b>libs</b>&quot;
directory. As far as you include both these compiled library versions into your
application delivery, the Android devices can automatically select the right
library version based on the available device&#39;s capabilities.<p>
Please yet be aware that depending on capabilities of the Android devices you
will need to provide the SoundTouch routines with samples in either integer or
floating-point format, so build your interface routines to take this into
account.<hr />
<h2>
Calling SoundTouch native routines from Android application</h2>
<p>The NDK tools build the SoundTouch c++ routines into a native binary library, while
Android applications are written in Java language. To call the SoundTouch and other c/c++
routines from an Android java application code, you'll need to use Java Native
Interface (JNI).</p>
<p>
The SoundTouch source code package provides source code example how to
use JNI to call native c++ routines from a Java class through the following
source code file pair:<ul>
<li><b>Android-lib/jni/soundtouch-jni.cpp</b>: This file contains c/c++ routine that
calls SoundTouch library routine to return the library version string to the main
Android application. The NDK compiles this file along with the SoundTouch
routines into the native binary library.</li>
<li><b>Android-lib/src/net/surina/soundtouch/SoundTouch.java</b>: This file provides
a Java interface class to load the native library and to invoke the native routine implemented in
the file <b>soundtouch-jni.cpp</b></li>
</ul>
<p>
Feel free to examine and extend the provided cpp/java source code example file pair to
implement and integrate the desired SoundTouch library capabilities into your Android application.</p>
<hr />
<p style="text-align: center"><i>Copyright &copy; Olli Parviainen</i></p>
<!--
$Id: README-SoundTouch-Android.html 165 2012-12-28 19:55:23Z oparviai $
-->
</body>
</html>
\ No newline at end of file
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# $Id: Android.mk 165 2012-12-28 19:55:23Z oparviai $
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# *** Remember: Change -O0 into -O2 in add-applications.mk ***
LOCAL_MODULE := soundtouch
LOCAL_SRC_FILES := soundtouch-jni.cpp ../../SoundTouch/AAFilter.cpp ../../SoundTouch/FIFOSampleBuffer.cpp \
../../SoundTouch/FIRFilter.cpp ../../SoundTouch/cpu_detect_x86.cpp \
../../SoundTouch/RateTransposer.cpp ../../SoundTouch/SoundTouch.cpp \
../../SoundTouch/TDStretch.cpp ../../SoundTouch/BPMDetect.cpp ../../SoundTouch/PeakFinder.cpp
# for native audio
LOCAL_LDLIBS += -lgcc
# --whole-archive -lgcc
# for logging
LOCAL_LDLIBS += -llog
# for native asset manager
#LOCAL_LDLIBS += -landroid
# don't export all symbols
# added "-marm" switch to use arm instruction set instead of thumb for improved calculation performance.
LOCAL_CFLAGS += -Wall -fvisibility=hidden -I ../../../include -D ST_NO_EXCEPTION_HANDLING -fdata-sections -ffunction-sections -marm
include $(BUILD_SHARED_LIBRARY)
# $Id: Application.mk 165 2012-12-28 19:55:23Z oparviai $
#
# Build both ARMv5TE and ARMv7-A machine code.
#
APP_ABI := armeabi-v7a armeabi
APP_OPTIM := release
////////////////////////////////////////////////////////////////////////////////
///
/// Example Interface class for SoundTouch native compilation
///
/// Author : Copyright (c) Olli Parviainen
/// Author e-mail : oparviai 'at' iki.fi
/// WWW : http://www.surina.net
///
////////////////////////////////////////////////////////////////////////////////
//
// $Id: soundtouch-jni.cpp 165 2012-12-28 19:55:23Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
#include <jni.h>
#include <android/log.h>
//#include <string.h>
//#include <stdio.h>
//#include <dlfcn.h>
#include "../../../include/SoundTouch.h"
//#include "TimeShiftEffect.h"
#define LOGV(...) __android_log_print((int)ANDROID_LOG_INFO, "SOUNDTOUCH", __VA_ARGS__)
//#define LOGV(...)
#define DLL_PUBLIC __attribute__ ((visibility ("default")))
using namespace soundtouch;
extern "C" DLL_PUBLIC jstring Java_net_surina_soundtouch_getVersionString(JNIEnv *env, jobject thiz)
{
const char *verStr;
LOGV("JNI call soundtouch.getVersionString");
// Call example SoundTouch routine
verStr = SoundTouch::getVersionString();
// return version as string
return env->NewStringUTF(verStr);
}
////////////////////////////////////////////////////////////////////////////////
///
/// Example class that invokes native SoundTouch routines through the JNI
/// interface.
///
/// Author : Copyright (c) Olli Parviainen
/// Author e-mail : oparviai 'at' iki.fi
/// WWW : http://www.surina.net
///
////////////////////////////////////////////////////////////////////////////////
//
// $Id: SoundTouch.java 165 2012-12-28 19:55:23Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
package net.surina.soundtouch;
public final class SoundTouch
{
// Native interface function that returns SoundTouch version string.
// This invokes the native c++ routine defined in "soundtouch-jni.cpp".
public native final String getVersionString();
// Load the native library upon startup
static
{
System.loadLibrary("soundtouch");
}
}
......@@ -15,10 +15,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date: 2012-06-13 22:29:53 +0300 (Wed, 13 Jun 2012) $
// Last changed : $Date: 2012-11-08 20:53:01 +0200 (Thu, 08 Nov 2012) $
// File revision : $Revision: 4 $
//
// $Id: FIFOSampleBuffer.cpp 143 2012-06-13 19:29:53Z oparviai $
// $Id: FIFOSampleBuffer.cpp 160 2012-11-08 18:53:01Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
......@@ -177,7 +177,7 @@ void FIFOSampleBuffer::ensureCapacity(uint capacityRequirement)
ST_THROW_RT_ERROR("Couldn't allocate memory!\n");
}
// Align the buffer to begin at 16byte cache line boundary for optimal performance
temp = (SAMPLETYPE *)(((ulong)tempUnaligned + 15) & (ulong)-16);
temp = (SAMPLETYPE *)SOUNDTOUCH_ALIGN_POINTER_16(tempUnaligned);
if (samplesInBuffer)
{
memcpy(temp, ptrBegin(), samplesInBuffer * channels * sizeof(SAMPLETYPE));
......
......@@ -11,10 +11,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date: 2012-09-01 10:43:51 +0300 (Sat, 01 Sep 2012) $
// Last changed : $Date: 2012-12-28 21:52:47 +0200 (Fri, 28 Dec 2012) $
// File revision : $Revision: 4 $
//
// $Id: PeakFinder.cpp 152 2012-09-01 07:43:51Z oparviai $
// $Id: PeakFinder.cpp 164 2012-12-28 19:52:47Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
......@@ -239,8 +239,6 @@ double PeakFinder::detectPeak(const float *data, int aminPos, int amaxPos)
// - sometimes the highest peak can be Nth harmonic of the true base peak yet
// just a slightly higher than the true base
int hp = (int)(highPeak + 0.5);
for (i = 3; i < 10; i ++)
{
double peaktmp, harmonic;
......
......@@ -13,10 +13,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date: 2012-04-01 22:49:30 +0300 (Sun, 01 Apr 2012) $
// Last changed : $Date: 2012-11-08 20:53:01 +0200 (Thu, 08 Nov 2012) $
// File revision : $Revision: 1.12 $
//
// $Id: TDStretch.cpp 137 2012-04-01 19:49:30Z oparviai $
// $Id: TDStretch.cpp 160 2012-11-08 18:53:01Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
......@@ -590,7 +590,7 @@ void TDStretch::acceptNewOverlapLength(int newOverlapLength)
pMidBufferUnaligned = new SAMPLETYPE[overlapLength * 2 + 16 / sizeof(SAMPLETYPE)];
// ensure that 'pMidBuffer' is aligned to 16 byte boundary for efficiency
pMidBuffer = (SAMPLETYPE *)((((ulong)pMidBufferUnaligned) + 15) & (ulong)-16);
pMidBuffer = (SAMPLETYPE *)SOUNDTOUCH_ALIGN_POINTER_16(pMidBufferUnaligned);
clearMidBuffer();
}
......
......@@ -11,10 +11,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date: 2012-04-01 23:00:09 +0300 (Sun, 01 Apr 2012) $
// Last changed : $Date: 2012-11-08 20:44:37 +0200 (Thu, 08 Nov 2012) $
// File revision : $Revision: 4 $
//
// $Id: cpu_detect_x86.cpp 138 2012-04-01 20:00:09Z oparviai $
// $Id: cpu_detect_x86.cpp 159 2012-11-08 18:44:37Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
......@@ -47,14 +47,12 @@
#if defined(__GNUC__) && defined(__i386__)
// gcc
#include "cpuid.h"
#endif
#if defined(_M_IX86)
// windows
#elif defined(_M_IX86)
// windows non-gcc
#include <intrin.h>
#define bit_MMX (1 << 23)
#define bit_SSE (1 << 25)
#define bit_SSE2 (1 << 26)
#define bit_MMX (1 << 23)
#define bit_SSE (1 << 25)
#define bit_SSE2 (1 << 26)
#endif
#endif
......
......@@ -20,10 +20,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date: 2012-04-01 22:49:30 +0300 (Sun, 01 Apr 2012) $
// Last changed : $Date: 2012-11-08 20:53:01 +0200 (Thu, 08 Nov 2012) $
// File revision : $Revision: 4 $
//
// $Id: mmx_optimized.cpp 137 2012-04-01 19:49:30Z oparviai $
// $Id: mmx_optimized.cpp 160 2012-11-08 18:53:01Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
......@@ -239,7 +239,7 @@ void FIRFilterMMX::setCoefficients(const short *coeffs, uint newLength, uint uRe
// Ensure that filter coeffs array is aligned to 16-byte boundary
delete[] filterCoeffsUnalign;
filterCoeffsUnalign = new short[2 * newLength + 8];
filterCoeffsAlign = (short *)(((ulong)filterCoeffsUnalign + 15) & -16);
filterCoeffsAlign = (short *)SOUNDTOUCH_ALIGN_POINTER_16(filterCoeffsUnalign);
// rearrange the filter coefficients for mmx routines
for (i = 0;i < length; i += 4)
......
......@@ -23,10 +23,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date: 2012-04-01 22:49:30 +0300 (Sun, 01 Apr 2012) $
// Last changed : $Date: 2012-11-08 20:53:01 +0200 (Thu, 08 Nov 2012) $
// File revision : $Revision: 4 $
//
// $Id: sse_optimized.cpp 137 2012-04-01 19:49:30Z oparviai $
// $Id: sse_optimized.cpp 160 2012-11-08 18:53:01Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
......@@ -93,7 +93,7 @@ double TDStretchSSE::calcCrossCorr(const float *pV1, const float *pV2) const
#define _MM_LOAD _mm_load_ps
if (((ulong)pV1) & 15) return -1e50; // skip unaligned locations
if (((ulongptr)pV1) & 15) return -1e50; // skip unaligned locations
#else
// No cheating allowed, use unaligned load & take the resulting
......@@ -218,7 +218,7 @@ void FIRFilterSSE::setCoefficients(const float *coeffs, uint newLength, uint uRe
// Ensure that filter coeffs array is aligned to 16-byte boundary
delete[] filterCoeffsUnalign;
filterCoeffsUnalign = new float[2 * newLength + 4];
filterCoeffsAlign = (float *)(((unsigned long)filterCoeffsUnalign + 15) & (ulong)-16);
filterCoeffsAlign = (float *)SOUNDTOUCH_ALIGN_POINTER_16(filterCoeffsUnalign);
fDivider = (float)resultDivider;
......@@ -246,7 +246,7 @@ uint FIRFilterSSE::evaluateFilterStereo(float *dest, const float *source, uint n
assert(dest != NULL);
assert((length % 8) == 0);
assert(filterCoeffsAlign != NULL);
assert(((ulong)filterCoeffsAlign) % 16 == 0);
assert(((ulongptr)filterCoeffsAlign) % 16 == 0);
// filter is evaluated for two stereo samples with each iteration, thus use of 'j += 2'
for (j = 0; j < count; j += 2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment