Depending on the quality that I need at the time, or the effort that I want to put in, i do this a variety of ways. USB interfaces are good for this, and as mentioned so are mixers. I also use my Tascam DR-40 which does a subpar job negates the need for a laptop or amplifier, similar to the Pandora and Tascam Bass Trainer.
The easiest way though, which I use most often, is : computer headphone out --> 1/8" to 1/4" adapter --> "effects in" or accessory input on amp.
Then, I just plug the bass and headphones into the amp as normal. Quality is not steller, but the job gets done without waking my 7 month old.