You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
788 B
Python

FluidBufCompose{
*process { arg server, srcBufNum, startAt = 0, nFrames = -1, startChan = 0, nChans = -1, srcGain = 1, dstBufNum, dstStartAt = 0, dstStartChan = 0, dstGain = 0, action;
srcBufNum = srcBufNum.asUGenInput;
dstBufNum = dstBufNum.asUGenInput;
if(srcBufNum.isNil) {Error("Invalid Buffer").format(thisMethod.name, this.class.name).throw};
if(dstBufNum.isNil) {Error("Invalid Buffer").format(thisMethod.name, this.class.name).throw};
server = server ? Server.default;
forkIfNeeded{
server.sendMsg(\cmd, \BufCompose, srcBufNum, startAt, nFrames, startChan, nChans, srcGain, dstBufNum, dstStartAt, dstStartChan, dstGain);
server.sync;
dstBufNum = server.cachedBufferAt(dstBufNum); dstBufNum.updateInfo; server.sync;
action.value(dstBufNum);
};
}
}