Effect of waves on cavitation and pressure pulses