Checking sound enabled before code to play sound