Effect of confinement on the sound velocity in a quark-gluon plasma