Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrolcl committed Aug 17, 2022
2 parents 05a1ed3 + 64b009b commit 82ff2ab
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion arm-wt-22k/lib_src/eas_dlssynth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 82ff2ab

Please sign in to comment.