release-packaging/Classes/FluidNRTProcess.sc: Make process() send a done message to the language iff processing is successful, hopefully resolves #34 properly this time

nix
Owen Green 6 years ago
parent 3f89afac0b
commit 278d50c608

@ -22,20 +22,25 @@ FluidNRTProcess : Object{
} }
process{|...ugenArgs| process{|...ugenArgs|
synth = { var reply = '/done' ++ UniqueID.next;
ugen.performList(\kr, ugenArgs.collect{|a| a.asUGenInput} ++ Done.freeSelf) synth = {
var ug = ugen.performList(\kr, ugenArgs.collect{|a| a.asUGenInput} ++ Done.freeSelf);
SendReply.kr(Done.kr(ug),reply)
}.play(server); }.play(server);
synth.postln; synth.postln;
forkIfNeeded{
synth.waitForFree; OSCFunc({
server.sync; forkIfNeeded{
outputBuffers.do{|buf| synth.waitForFree;
buf = server.cachedBufferAt(buf.asUGenInput); server.sync;
buf.updateInfo; outputBuffers.do{|buf|
server.sync; buf = server.cachedBufferAt(buf.asUGenInput);
}; buf.updateInfo;
if(action.notNil){action.valueArray(outputBuffers)}; server.sync;
}; };
if(action.notNil){action.valueArray(outputBuffers)};
}
}, reply).oneShot;
^this; ^this;
} }

Loading…
Cancel
Save