Yep that’s one good option (it’s what I currently do). I’m actually surprised how much I like my DAI now that I have one.
However there’s a few cheaper paths that work fine if all you need is to hear the computer while practicing with phones.
@The_Baron , first, see if your amp has an Aux In jack. If it does, then you can take the Line Out from your computer and run it in to the amp’s Aux In, and then use headphones with the amp. This will require buying a cable. Be careful playing with volume while doing this.
Another option is something like a Vox AmPlug2 Bass - it’s a headphone preamp that plugs right in to your bass for quiet practice. They have Aux In jacks to run the computer in to like I just mentioned, and unlike the one it sounds like you had, the Vox is actually good.
If you don’t mind spending the money now though, there is a lot of advantage with going with what @joergkutter suggested, because eventually you will want to record yourself, and it is the best way. I recently bought a Zoom U-24 DAI and I am completely happy with it. Relatively inexpensive, good quality, and lots of features. The U-22 looks good too if you know you will never need more than one in and don’t care about MIDI.