Permalink
Browse files

GrainBuf: fix error handling

Signed-off-by: Tim Blechmann <tim@klingt.org>

git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9910 a380766d-ff14-0410-b294-a243070f3f08
  • Loading branch information...
1 parent b9f1c37 commit a4fe3bcd6d28b843b96c7239baa8312c7e6a888c Tim Blechmann committed Mar 1, 2010
Showing with 2 additions and 9 deletions.
  1. +2 −9 common/Source/plugins/GrainUGens.cpp
View
11 common/Source/plugins/GrainUGens.cpp
@@ -1090,8 +1090,8 @@ inline void GrainBuf_next_play_active(GrainBuf *unit, int inNumSamples)
if (!bufData) {
grain->counter -= inNumSamples;
- GrainBuf_grain_cleanup(unit, grain);
- ++i;
+ if (!GrainBuf_grain_cleanup(unit, grain))
+ ++i;
continue;
}
@@ -1114,13 +1114,6 @@ inline void GrainBuf_next_play_active(GrainBuf *unit, int inNumSamples)
else
GRAIN_BUF_PLAY_GRAIN(CUSTOM);
-
- if (grain->counter <= 0) {
- *grain = unit->mGrains[--unit->mNumActive]; // remove grain
- continue;
- }
- ++i;
-
if (GrainBuf_grain_cleanup(unit, grain))
continue;
++i;

0 comments on commit a4fe3bc

Please sign in to comment.