I currently had the HTC 10 and the S9+. The loudspeaker the galaxy sounds much better, but the sound coming through wired headphones are better on the HTC. Yes, even with the dolby atmos turned on.
i am using the HTC 10 since it launched. still satisfied until today. and i also owned a galaxy S8. trust me, the 10 is faster with no lag, much better speaker, and the audio from the headphone jack is much much mor superior than the S8.