most soundcards will have internal routing capabilities to do this - it's usually just a matter of selecting the correct input in sonar to record the output of the soundcard.
I've had 2 "prosumer" soundcards since I started recording. one was an m-audio delta 44 then other is my current MOTU. the MOTU was more difficult to set up to record the output than the delta 44, but both were/are capable.
what soundcard are you using?