Having two buffers for audio isn't really good.
Make the maximum size of the jbuf at least 4 times the capacity.

Should prevent issues that might occur because a different thread is
reading it.