summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-16 18:35:43 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-16 18:35:43 +0000
commit609921f13ff54ee56d475289c605180841eea225 (patch)
tree455b0b78a6b704c880ef307e2109ec8fc2e3ade4
parent6327bcae461dd7bbcd8315a3edffaf01c7afe9b9 (diff)
parent97f70ed81db9d903cedd3d900d176aa16fc1241d (diff)
downloadsonivox-android13-frc-neuralnetworks-release.tar.gz
Snap for 8598433 from 97f70ed81db9d903cedd3d900d176aa16fc1241d to tm-frc-neuralnetworks-releaset_frc_neu_330443030t_frc_neu_330443000android13-frc-neuralnetworks-release
Change-Id: I8bb00bacbeb7864124fa9edb05211f1010b83fd7
-rw-r--r--arm-wt-22k/lib_src/eas_dlssynth.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arm-wt-22k/lib_src/eas_dlssynth.c b/arm-wt-22k/lib_src/eas_dlssynth.c
index 8606a29..a07262c 100644
--- a/arm-wt-22k/lib_src/eas_dlssynth.c
+++ b/arm-wt-22k/lib_src/eas_dlssynth.c
@@ -348,11 +348,24 @@ EAS_RESULT DLS_StartVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH_VOIC
pWTVoice->phaseAccum = (EAS_U32) pSynth->pDLS->pDLSSamples + pSynth->pDLS->pDLSSampleOffsets[pDLSRegion->wtRegion.waveIndex];
if (pDLSRegion->wtRegion.region.keyGroupAndFlags & REGION_FLAG_IS_LOOPED)
{
+#if defined (_8_BIT_SAMPLES)
pWTVoice->loopStart = pWTVoice->phaseAccum + pDLSRegion->wtRegion.loopStart;
pWTVoice->loopEnd = pWTVoice->phaseAccum + pDLSRegion->wtRegion.loopEnd - 1;
+#else //_16_BIT_SAMPLES
+ pWTVoice->loopStart = pWTVoice->phaseAccum + (pDLSRegion->wtRegion.loopStart<<1);
+ pWTVoice->loopEnd = pWTVoice->phaseAccum + (pDLSRegion->wtRegion.loopEnd<<1) - 2;
+#endif
}
else
- pWTVoice->loopStart = pWTVoice->loopEnd = pWTVoice->phaseAccum + pSynth->pDLS->pDLSSampleLen[pDLSRegion->wtRegion.waveIndex] - 1;
+ {
+#if defined (_8_BIT_SAMPLES)
+ pWTVoice->loopStart = pWTVoice->loopEnd = pWTVoice->phaseAccum
+ + pSynth->pDLS->pDLSSampleLen[pDLSRegion->wtRegion.waveIndex] - 1;
+#else //_16_BIT_SAMPLES
+ pWTVoice->loopStart = pWTVoice->loopEnd = pWTVoice->phaseAccum
+ + pSynth->pDLS->pDLSSampleLen[pDLSRegion->wtRegion.waveIndex] - 2;
+#endif
+ }
return EAS_SUCCESS;
}