Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
plugins: GrainBuf - allocate grain after reading window
Signed-off-by: Tim Blechmann <tim@klingt.org>
(cherry picked from commit 13502b8)
  • Loading branch information
timblechmann committed Aug 31, 2012
1 parent 97f8866 commit 65af48c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server/plugins/GrainUGens.cpp
Expand Up @@ -1151,15 +1151,13 @@ static inline void GrainBuf_next_start_new(GrainBuf *unit, int inNumSamples, int
return;
}

GrainBufG *grain = unit->mGrains + unit->mNumActive++;
float winType = grain_in_at<full_rate>(unit, 7, position);
DECLARE_WINDOW
bool success = getGrainWin(unit, winType, window, windowData, windowSamples, windowFrames, windowGuardFrame);
if (!success) {
GrainBuf_grain_cleanup(unit, grain);
if (!success)
return;
}

GrainBufG *grain = unit->mGrains + unit->mNumActive++;
int32 bufnum = grain_in_at<full_rate>(unit, 2, position);
grain->bufnum = bufnum;

Expand Down

0 comments on commit 65af48c

Please sign in to comment.