The main factor which affects the speed of sound wave is the?