The speed of sound waves is affected by