Some facets of the way sound waves travel through glasses are still unclear. Recent works have shown that in the low-temperature harmonic limit a crucial role in controlling sound damping is played by local elastic heterogeneity. Sound waves propagation has been demonstrated to be strongly affected by inhomogeneous mechanical features of the materials, which add to the anharmonic couplings at finite temperatures. We describe the interplay between these two effects by molecular dynamics simulation of a model glass. In particular, we focus on the transverse components of the vibrational excitations in terms of dynamic structure factors, and characterize the temperature dependence of sound attenuation rates in an extended frequency range. We provide a complete picture of all phenomena, in terms encompassing both theory and experiments.