for (i=0;i<10000;++i) {
    a = inIon() ? 0 : 300;
    buf = new Uint8ClampedArray(a);
}