fixes compilation issues and supports larger samples

* compiles with ALLOW_MEMORY_GROWTH
* exports functions
* compiles with ASM_JS

* BUFSIZE is adjusted according to the size of the input channel, thus supports larger buffers