Working sine wave sound function