The temperature dependences of the elastic constants of Ni0.50Mn0.284Ga0.216 and Fe3Pd were studied. Measurements were conducted by the ultrasonic continuous wave method. Anomalous behavior of the elastic constants temperature dependence in austenitic NiMnGa was observed, especially an abrupt 15% softening of C11 at the Curie temperature. The latter anomaly was found to be strongly influenced by the presence and orientation of applied magnetic fields. In martensitic NiMnGa, the temperature dependences of the velocities of all eleven elastic wave modes had abrupt changes at 220K, which indicate a structural phase change from the tetragonal to a second phase at lower temperature. The temperature and magnetic field effects in Fe3Pd were also studied by the elastic constants measurements.