Shock drift acceleration in the presence of waves