Upgraded to new wavwrite interface