kinda stuck with my code...


    Feb 23 2013 | 5:37 pm
    I seem to be having a problem with this code, max says it doesnt undersand signal, could anyone offer improvement or help?
    import com.cycling74.max.*;
    import com.cycling74.msp.*;
    public class FeedDelay extends MSPPerformer {
    float[] bufferC = new float[88200];
    int delaySamples = 44100;
    int readPoint = 0;
    int writePoint = delaySamples;
    public FeedDelay() {
    declareInlets(new int[]{SIGNAL,SIGNAL});
    declareOutlets(new int[]{SIGNAL});
    }
    public void inlet(float f) {
    }
    public void dspsetup(MSPSignal[] ins, MSPSignal[] outs) {
    }
    public void perform(MSPSignal[] ins, MSPSignal[] outs) {
    float[] in = ins[0].vec;
    float[] in1 = ins[1].vec;
    float[] out = outs[0].vec;
    for (int i = 0; i < in.length; i++) {
    out[i] = bufferC[readPoint++] ;
    out[i] = bufferC[readPoint++] * 2;
    in[i]= bufferC[writePoint++];
    if (readPoint >= delaySamples){
    readPoint = 0;
    }
    if (writePoint >= delaySamples){
    writePoint = 0;
    }
    }
    }
    }