コード例 #1
0
ファイル: SC_Graph.cpp プロジェクト: ARTisERR0R/supercollider
void Graph_MapControl(Graph* inGraph, uint32 inIndex, uint32 inBus)
{
	if (inIndex >= GRAPHDEF(inGraph)->mNumControls) return;
	World *world = inGraph->mNode.mWorld;
	if (inBus >= 0x80000000) {
		inGraph->mControlRates[inIndex] = 0;
		inGraph->mMapControls[inIndex] = inGraph->mControls + inIndex;
	} else if (inBus < world->mNumControlBusChannels) {
		inGraph->mControlRates[inIndex] = 1;
		inGraph->mMapControls[inIndex] = world->mControlBus + inBus;
	}
}
コード例 #2
0
ファイル: SC_Graph.cpp プロジェクト: ARTisERR0R/supercollider
void Graph_MapAudioControl(Graph* inGraph, uint32 inIndex, uint32 inBus)
{
    if (inIndex >= GRAPHDEF(inGraph)->mNumControls) return;
    World *world = inGraph->mNode.mWorld;
    /* what is the below doing??? it is unmapping by looking for negative ints */
    if (inBus >= 0x80000000) {
		inGraph->mControlRates[inIndex] = 0;
		inGraph->mMapControls[inIndex] = inGraph->mControls + inIndex;
	} else if (inBus < world->mNumAudioBusChannels) {
        inGraph->mControlRates[inIndex] = 2;
		inGraph->mMapControls[inIndex] = world->mAudioBus + (inBus * world->mBufLength);
    }
}
コード例 #3
0
ファイル: SC_Graph.cpp プロジェクト: DSastre/supercollider
int Graph_GetControl(Graph* inGraph, uint32 inIndex, float& outValue)
{
	if (inIndex >= GRAPHDEF(inGraph)->mNumControls) return kSCErr_IndexOutOfRange;
	outValue = inGraph->mControls[inIndex];
	return kSCErr_None;
}