The speed of sound depends on the medium through which the waves are passing.The speed of sound in gases depends on what?

Mass

Volume

Weight

Density