You could have a defective audio cable, or a defective connection on the PC board, inside the computer. The plastic jacks sometimes break.
Most home computers have 2 audio outputs, front and rear. You might switch to the other one and try it again.
Laptops have 1 output...