Measurements of sound velocities in shock-compressed tantalum and LY12 Al