Use stft.finishOutput() in stretch.flush() to avoid errors
This commit is contained in:
parent
eaa9883ff1
commit
7238c4c5a4
@ -7,7 +7,7 @@ include(FetchContent)
|
|||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
signalsmith-linear
|
signalsmith-linear
|
||||||
GIT_REPOSITORY https://github.com/Signalsmith-Audio/linear.git
|
GIT_REPOSITORY https://github.com/Signalsmith-Audio/linear.git
|
||||||
GIT_TAG a0d287899adad259e3e29ac4831ffa0368f07092
|
GIT_TAG 8b552cc24e334387c863033826769a4c6c89c1f2
|
||||||
GIT_SHALLOW ON
|
GIT_SHALLOW ON
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(signalsmith-linear)
|
FetchContent_MakeAvailable(signalsmith-linear)
|
||||||
|
|||||||
@ -260,6 +260,7 @@ struct SignalsmithStretch {
|
|||||||
void flush(Outputs &&outputs, int outputSamples) {
|
void flush(Outputs &&outputs, int outputSamples) {
|
||||||
int plainOutput = std::min<int>(outputSamples, stft.blockSamples());
|
int plainOutput = std::min<int>(outputSamples, stft.blockSamples());
|
||||||
int foldedBackOutput = std::min<int>(outputSamples, int(stft.blockSamples()) - plainOutput);
|
int foldedBackOutput = std::min<int>(outputSamples, int(stft.blockSamples()) - plainOutput);
|
||||||
|
stft.finishOutput(1);
|
||||||
for (int c = 0; c < channels; ++c) {
|
for (int c = 0; c < channels; ++c) {
|
||||||
tmpBuffer.resize(plainOutput);
|
tmpBuffer.resize(plainOutput);
|
||||||
stft.readOutput(c, plainOutput, tmpBuffer.data());
|
stft.readOutput(c, plainOutput, tmpBuffer.data());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user