diff options
author | Marco Nelissen <marcone@google.com> | 2017-06-16 22:01:48 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-06-16 22:01:48 +0000 |
commit | 8425c93100406ac919b99f5b1896e7dc889ff3d6 (patch) | |
tree | 0d0e8e8baa47ac79dac25b0c8b6a591930333a3f | |
parent | fe21703054f89752c7deaa8e4416bd8ada18cc04 (diff) | |
parent | 484259e3225961b593b87671d37e17ced73ee644 (diff) | |
download | sonivox-8425c93100406ac919b99f5b1896e7dc889ff3d6.tar.gz |
Fix interpolator am: d19edc9c09 am: bc14d38658 am: 0b83c1b546 am: 3d07205d8f am: a8dbaf61fa am: 4ff958e63c am: 5aa18809e5 am: a703284789 am: b29f9181aa
am: 484259e322
Change-Id: I7b481e884d651cecf388ba499953e50be99a67d2
-rw-r--r-- | arm-wt-22k/lib_src/eas_wtsynth.c | 9 |
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; |