Index fix

Use stdlib functions for converting little-endian bytes to single values
Fix indexing of sample/channel in readSample. Use int for sample index to avoid overflow for wav files with greater than UINT16_MAX samples