Forgot to pad and clear the buffer in one case
This commit is contained in:
parent
e195cdd218
commit
5abfa5ef18
1 changed files with 2 additions and 1 deletions
|
|
@ -79,7 +79,8 @@ std::unique_ptr<sfz::AudioBuffer<T>> readFromFile(SndfileHandle& sndFile, uint32
|
|||
if (factor == sfz::Oversampling::x1)
|
||||
return baseBuffer;
|
||||
|
||||
auto outputBuffer = absl::make_unique<sfz::AudioBuffer<T>>(sndFile.channels(), numFrames * static_cast<int>(factor));
|
||||
auto outputBuffer = absl::make_unique<sfz::AudioBuffer<T>>(sndFile.channels(), numFrames * static_cast<int>(factor) + sfz::config::excessFileFrames);
|
||||
outputBuffer->clear();
|
||||
sfz::Oversampler oversampler { factor };
|
||||
oversampler.stream(*baseBuffer, *outputBuffer);
|
||||
return outputBuffer;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue