diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-17 07:11:34 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-17 07:11:34 +0000 |
commit | 6e43e3a1ce5f53faa2b8a0b9ed689c1f27b0c5a0 (patch) | |
tree | 455b0b78a6b704c880ef307e2109ec8fc2e3ade4 | |
parent | 323cce2c7ec80dcd35fcb18dabeb87c1a2602042 (diff) | |
parent | ff2ab4d7066aa44caa61161b1ef13e35bb568300 (diff) | |
download | sonivox-android13-mainline-art-release.tar.gz |
Snap for 8603505 from ff2ab4d7066aa44caa61161b1ef13e35bb568300 to mainline-art-releaseaml_art_331813100aml_art_331813010aml_art_331711080aml_art_331612010aml_art_331413030aml_art_331314010aml_art_331113000aml_art_331012050android13-mainline-art-release
Change-Id: I575a6d5b78751668109093f4cfc2bb53e1460514
-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; } |