kernel Mixer4Channel < namespace: "com.kevingoldsmith"; vendor: "Kevin Goldsmith"; version: 1; description: "4 channel stereo audio mixer"; > { input image4 src1; input image4 src2; input image4 src3; input image4 src4; output pixel4 dst; parameter float4 volume < minValue: float4(0.0); maxValue: float4(1.2); defaultValue: float4(1.0); >; void evaluatePixel() { dst = ((sampleNearest(src1, outCoord())*volume[0]) + (sampleNearest(src2, outCoord())*volume[1]) + (sampleNearest(src3, outCoord())*volume[2]) + (sampleNearest(src4, outCoord())*volume[3])); } }