Reduce amount of useless copying in WAV module, optimize rounding

10-15% faster WAV loading.