diff options
author | Marco Nelissen <marcone@google.com> | 2017-06-16 21:37:29 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-06-16 21:37:29 +0000 |
commit | b29f9181aad70d8dd4c642414ac97c9c7a9dd7b6 (patch) | |
tree | 22f036dae7f502e20826085222efc5aeb14536c1 | |
parent | 016843f3e3fd4df68d8a190d9de5a75de8c1ede2 (diff) | |
parent | a703284789da9120c7ebbc6ed7b0b47f25fe7435 (diff) | |
download | sonivox-b29f9181aad70d8dd4c642414ac97c9c7a9dd7b6.tar.gz |
Fix interpolator am: d19edc9c09 am: bc14d38658 am: 0b83c1b546 am: 3d07205d8f am: a8dbaf61fa am: 4ff958e63c am: 5aa18809e5
am: a703284789
Change-Id: Ifecc7114d8914b7f137846f33984ecc040b09a1c
-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 9257951..f2e466c 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; |