Function fits the line with the sample values at BeginOff and EndOff and writes the new values at samples between the two. Writes the samples selected by the copy function to the location specified, and shifts over the previous samples so nothing is overwritten. Installs the mouse callback. To avoid distortion, the sum of the Levels should not exceed 1000. Normalizes the volume of the track by multiplying each sample in a track by a constant.
Function calclutates the offset in bytes.
Increments the index, returns the item there and inserts a new one in its place. Also changes the track info in memory accordingly so when the track is written to a file the header says its a mono file.