converting bytes to samples