[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] Re: calling the stream upon EventStreamPlayer-stop
On Jan 2, 2006, at 3:56 PM, rkuivila@xxxxxxxxxxxx wrote:
Are you using an old build?
One of the mysteries of cvs I guess... I updated from cvs well after the last update for Stream.sc shown in the cvs log, but I didn't get that change. ???
Must have been due to some changes in my copy that I've yet to commit, specifically the following. I posted this for approval a couple of weeks ago but no one bothered to object--does that mean it's OK? see http://www.create.ucsb.edu/pipermail/sc-users/2005-September/020832.html
<x-tad-smaller>PauseStream:
play { </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> argClock, doReset = (</x-tad-smaller><x-tad-smaller>false</x-tad-smaller><x-tad-smaller>), quant=0.0;
if (stream.notNil, { </x-tad-smaller><x-tad-smaller>"already playing"</x-tad-smaller><x-tad-smaller>.postln; ^</x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller> });
if (doReset, { </x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>.reset });
clock = argClock ? clock ? </x-tad-smaller><x-tad-smaller>TempoClock</x-tad-smaller><x-tad-smaller>.default;
streamHasEnded = </x-tad-smaller><x-tad-smaller>false</x-tad-smaller><x-tad-smaller>;
stream = originalStream;
isWaiting = </x-tad-smaller><x-tad-smaller>true</x-tad-smaller><x-tad-smaller>; </x-tad-smaller><x-tad-smaller>// make sure that accidental play/stop/play sequences</x-tad-smaller><x-tad-smaller>
</x-tad-smaller><x-tad-smaller>// don't cause memory leaks</x-tad-smaller><x-tad-smaller>
clock.play({
if(isWaiting and: { nextBeat.isNil }) {
clock.sched(0, </x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>);
isWaiting = </x-tad-smaller><x-tad-smaller>false</x-tad-smaller><x-tad-smaller>;
};
</x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>
}, quant);
^</x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>
}
stop {
stream = </x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>;
isWaiting = </x-tad-smaller><x-tad-smaller>false</x-tad-smaller><x-tad-smaller>;
}
pause {
stream = </x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>;
isWaiting = </x-tad-smaller><x-tad-smaller>false</x-tad-smaller><x-tad-smaller>;
}
</x-tad-smaller>
Plus removing the separate definition of EventStreamPlayer-play, which is identical to PauseStream-play anyway.
hjh
: 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