[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-dev] [approve] couple of changes in stream.sc
I've been sitting on these awhile. OK to commit?
hjh
Index: Stream.sc
===================================================================
RCS file:
/cvsroot/supercollider/SuperCollider3/build/SCClassLibrary/Common/
Streams/Stream.sc,v
retrieving revision 1.55
diff -r1.55 Stream.sc
285,286c285,291
< cleanup.value(this, inval);
< cleanup = nil;
---
> try {
> cleanup.value(this, inval);
> cleanup = nil;
> } { |error|
> error.reportError;
> "CleanupStream cleanup failed.
Continuing to stop stream.".warn;
> }
299a305
> var <isWaiting = false;
313c319,328
< clock.play(this, quant);
---
> isWaiting = true; // make sure that accidental
play/stop/play sequences
> // don't cause memory
leaks
> clock.play({
> if(isWaiting and: { nextBeat.isNil }) {
> clock.sched(0, this);
> isWaiting = false;
> };
> nil
> }, quant);
> ^this
316c331,334
< stop { stream = nextBeat = nil }
---
> stop {
> stream = nil;
> isWaiting = false;
> }
320c338
< pause { stream = nextBeat = nil }
---
> pause { this.stop }
: H. James Harkins
: jamshark70@xxxxxxxxxxxxxxxxx
: http://www.dewdrop-world.net
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman