diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-18 07:33:43 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-18 07:33:43 +0000 |
commit | a8df537d49ce8f6fde615a02a71e034eeb800a35 (patch) | |
tree | 9271d9eb684930054222eb4c63a17f07c8a410c5 | |
parent | 49c6f7e13aa187382893fd263b1a547e664ad133 (diff) | |
parent | 57b6442e4a7b8721ef0deb26ae031761c293eefa (diff) | |
download | sonivox-oreo-dr2-release.tar.gz |
release-request-3c1c3700-216e-49d1-9df9-ce360055034d-for-git_oc-dr1-release-4111683 snap-temp-L18000000075285549android-8.0.0_r34android-8.0.0_r33android-8.0.0_r27android-8.0.0_r26android-8.0.0_r25android-8.0.0_r24android-8.0.0_r23android-8.0.0_r22android-8.0.0_r21oreo-dr3-releaseoreo-dr2-releaseoreo-dr1-release
Change-Id: I37f5275ca37f67b5f363e37af2ca2215d1f34091
-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; |