diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-07-26 23:18:28 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-07-26 23:18:28 +0000 |
commit | 182e83271edcb4ae3d6de9469b420d861ba4ca5b (patch) | |
tree | 0d0e8e8baa47ac79dac25b0c8b6a591930333a3f | |
parent | 79003f3b899698b70c4ae2685307390d6956c7a4 (diff) | |
parent | 34463f08f8a52acd0013b17fdda2cb70fd97de7c (diff) | |
download | sonivox-nougat-mr1-volantis-release.tar.gz |
Merge cherrypicks of [2604297, 2604299, 2604519, 2606195, 2605695, 2604520, 2606196, 2604521, 2604522, 2606197, 2604523, 2605696, 2605697, 2605698, 2606198, 2604524, 2604525, 2604526, 2604300, 2604527, 2606199, 2604528, 2604529, 2604301, 2606200, 2604302, 2606410, 2606201, 2606411, 2606202, 2606413, 2606203, 2606414, 2604303, 2604304, 2606204, 2604305, 2606206, 2606207, 2604306, 2606415, 2606208, 2606209, 2606416] into nyc-mr1-volantis-releaseandroid-7.1.1_r58android-7.1.1_r53nougat-mr1-volantis-releasenougat-mr1-flounder-release
Change-Id: I875d81be0d399cffc762d9a1b1d1f6028817fba4
-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; |