Equation of state and sound velocity of a hadronic gas with a hard-core interaction