Added routine to add zeros at end of createWave. It got rid of clicks!  :)