Fixed WaveIO to process large files.
modified to process large wave files