Create pv_conventional_buffered with nearly identical output to original.
Factor out a buffer-filling routine and make pv operate on complete buffers.
Emscripten stuff.