Correction of bug in the getendframe, add some function and beginning of the splitwavfile function