First see if you Cable is going in all the way in the computer.
If not, Try using the front or back headphone jack.
If not, try a different computer and if that didn't fix it RMA it.
I have the HTC one M8 and some of my friends have the M7 and i think the M8 is the way to go. with the M8 you have a bigger screen, better speaker, faster hardware, etc.
Go with the M8