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 {
|
else {
|
||||||
// cut short the voice at the instant of reaching end of sample
|
// cut short the voice at the instant of reaching end of sample
|
||||||
const auto sampleEnd = min(
|
const auto sampleEnd = min(
|
||||||
static_cast<int>(currentPromise_->information.end),
|
int(region_->trueSampleEnd(resources_.filePool.getOversamplingFactor())),
|
||||||
static_cast<int>(source.getNumFrames())
|
int(currentPromise_->information.end),
|
||||||
) - 1;
|
int(source.getNumFrames()))
|
||||||
|
- 1;
|
||||||
|
|
||||||
for (unsigned i = 0; i < numSamples; ++i) {
|
for (unsigned i = 0; i < numSamples; ++i) {
|
||||||
if ((*indices)[i] >= sampleEnd) {
|
if ((*indices)[i] >= sampleEnd) {
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue