Improve audio callback handling.
The result should be much more correct now.