diff --git a/Audio/Chain/DSP/DSPRubberbandNode.m b/Audio/Chain/DSP/DSPRubberbandNode.m index 1beadc955..c4c9a05f6 100644 --- a/Audio/Chain/DSP/DSPRubberbandNode.m +++ b/Audio/Chain/DSP/DSPRubberbandNode.m @@ -439,6 +439,8 @@ static void * kDSPRubberbandNodeContext = &kDSPRubberbandNodeContext; streamTimeRatio = [chunk streamTimeRatio]; isHDCD = [chunk isHDCD]; + stretchIn += [chunk duration] / tempo; + size_t frameCount = [chunk frameCount]; NSData *sampleData = [chunk removeSamples:frameCount]; @@ -446,8 +448,6 @@ static void * kDSPRubberbandNodeContext = &kDSPRubberbandNodeContext; cblas_scopy((int)frameCount, ((const float *)[sampleData bytes]) + i, channels, rsPtrs[i], 1); } - stretchIn += [chunk duration] / tempo; - endOfStream = [[previousNode buffer] isEmpty] && [previousNode endOfStream] == YES; int len = (int)frameCount;