Merge pull request #618 from dwuertz/fix-region-end
Respect region end opcode
This commit is contained in:
commit
fec97ffc16
1 changed files with 5 additions and 3 deletions
|
|
@ -950,9 +950,11 @@ void Voice::Impl::fillWithData(AudioSpan<float> buffer) noexcept
|
|||
else {
|
||||
// cut short the voice at the instant of reaching end of sample
|
||||
const auto sampleEnd = min(
|
||||
static_cast<int>(currentPromise_->information.end),
|
||||
static_cast<int>(source.getNumFrames())
|
||||
) - 1;
|
||||
int(region_->trueSampleEnd(resources_.filePool.getOversamplingFactor())),
|
||||
int(currentPromise_->information.end),
|
||||
int(source.getNumFrames()))
|
||||
- 1;
|
||||
|
||||
for (unsigned i = 0; i < numSamples; ++i) {
|
||||
if ((*indices)[i] >= sampleEnd) {
|
||||
#ifndef NDEBUG
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue