accept float[] buffer input since Java has no pass-by-pointer
added debug headers