X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffourier.C;h=7f52fe0c8e4c1a5f5d4e886fd8ab30dc3afe32fa;hb=22c6251d37911a11e322bf7518e6a992ea0bb6c7;hp=f78a45bd1e092a990864e9efd716a88cd430d954;hpb=3836e2ca418201dccf1101947269fb26debb3cb4;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/fourier.C b/cinelerra-5.1/cinelerra/fourier.C index f78a45bd..7f52fe0c 100644 --- a/cinelerra-5.1/cinelerra/fourier.C +++ b/cinelerra-5.1/cinelerra/fourier.C @@ -429,9 +429,11 @@ int CrossfadeFFT::process_buffer(int64_t output_sample, } input_buffer->set_offset(input_size); - result = read_samples(input_sample, need_samples-input_size, input_buffer); + if( need_samples > input_size ) { + result = read_samples(input_sample, need_samples-input_size, input_buffer); + input_sample += step * (need_samples - input_size); + } input_buffer->set_offset(0); - input_sample += step * (need_samples - input_size); input_size = need_samples;