Longitudinal sound measurements on UPt3 in a magnetic field