diff options
author | Xin Li <delphij@google.com> | 2022-08-16 19:11:23 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-08-16 19:11:23 +0000 |
commit | 64b009bd048fe39ade89f13324cfd7dfb5b2f127 (patch) | |
tree | e484fb25d9196aa2588717be3c7b9049efd2b240 | |
parent | bc685c9b6b3eca629b4dffb84cfb5c96aab6d9c2 (diff) | |
parent | c7858204da86277eb868b44d49ac0d5992af0840 (diff) | |
download | sonivox-64b009bd048fe39ade89f13324cfd7dfb5b2f127.tar.gz |
Merge "DO NOT MERGE - Merge Android 13"main-16k
-rw-r--r-- | arm-wt-22k/lib_src/eas_dlssynth.c | 15 |
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; } |