.wav output more robust to change in matlab version