To do it this way, you'll have to have the PC on when you use the PS2, but other than that, this would be a no-hassle to use solution:
You should be able to use an RCA to 1/8 stereo Y adapter cable (available at any of the big electronic stores or Radio Shack) to connect the audio out on the PS2 to the "Line In" connector on the sound card of your PC.
From there, open the audio control panel applet (speaker icon, lower RH corner) on your pc (I assume you are running some version of Windows?) and enable the "Line In", usually done by ticking an enable box or unticking a "Mute" box.
You'll probably have to play with the level settings for line in to get the audio output to match MAME so volume levels don't change alot when you switch between systems.
All you are doing with this is routing the audio from the PS2 to the computer speakers via the computers sound card. You get the added feature of being able to balance the volume levels with the speaker/sound card applet to maintain consistant volume levels between gaming systems.
Good luck!
D