summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2017-06-16 23:07:27 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-06-16 23:07:27 +0000
commit57b6442e4a7b8721ef0deb26ae031761c293eefa (patch)
tree9271d9eb684930054222eb4c63a17f07c8a410c5
parent3805bfcee1faabb44e6f1f6270cbba66c9d454da (diff)
parent2d57988c6a8e6b9f3b83b92f2094dba9d88ac87f (diff)
downloadsonivox-oreo-dr1-dev.tar.gz
Fix interpolator am: d19edc9c09 am: bc14d38658 am: 0b83c1b546 am: 3d07205d8f am: a8dbaf61fa am: 4ff958e63c am: 5aa18809e5 am: a703284789 am: b29f9181aa am: 484259e322 am: 8425c93100 am: 2226332aca am: c85c4b3e20 am: 57dcaf685c am: df6fbaa4e5oreo-dr1-dev
am: 2d57988c6a Change-Id: I180e7be1d13fa3bfa332eae69b7dc86de459c487
-rw-r--r--arm-wt-22k/lib_src/eas_wtsynth.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arm-wt-22k/lib_src/eas_wtsynth.c b/arm-wt-22k/lib_src/eas_wtsynth.c
index 9fcda7b..8488fe2 100644
--- a/arm-wt-22k/lib_src/eas_wtsynth.c
+++ b/arm-wt-22k/lib_src/eas_wtsynth.c
@@ -28,6 +28,7 @@
*/
// includes
+#define LOG_TAG "SYNTH"
#include "log/log.h"
#include <cutils/log.h>
@@ -557,6 +558,14 @@ static EAS_BOOL WT_UpdateVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH
else
temp += (pVoice->note + pSynth->globalTranspose) * 100;
intFrame.frame.phaseIncrement = WT_UpdatePhaseInc(pWTVoice, pArt, pChannel, temp);
+ temp = pWTVoice->loopEnd - pWTVoice->loopStart;
+ if (temp != 0) {
+ temp = temp << NUM_PHASE_FRAC_BITS;
+ if (intFrame.frame.phaseIncrement > temp) {
+ ALOGW("%p phaseIncrement=%d", pWTVoice, (int)intFrame.frame.phaseIncrement);
+ intFrame.frame.phaseIncrement %= temp;
+ }
+ }
/* call into engine to generate samples */
intFrame.pAudioBuffer = pVoiceMgr->voiceBuffer;