Evolution of the air-cavity during a wave impact