public int work(float[] buffer) throws AOException {
        returned = this.previous[0].nextWork(buffer);
        if (this.inputs == 2) {
            if (tmp == null || tmp.length != buffer.length) {
                tmp = new float[buffer.length];
            } else for (index = 0; index < tmp.length; index++) {
                tmp[index] = 0.0f;
            }
            if (returned != this.previous[1].nextWork(tmp)) {
                throw new AOException(this.name, 0);
            }
            for (index = 0; index < returned; index++) {
                buffer[index] = buffer[index] * tmp[index];
            }
        } else {
            for (index = 0; index < returned; index++) {
                buffer[index] = buffer[index] * this.volume;
            }
        }
        return returned;
    }