Refactored sound playing.