Freeware software

does anyone know of any software i could use to capture sound that’s playing from a specific program? For example, if i was playing a video in WM and wanted to capture the sound from that, and create an mp3 or wma from that? That’s not what i’m wanting to do, but it’s fairly similar.

SIDE NOTE: If that doesn’t seem intelligable to some/any of you, sorry. I had the drowsy and non-drowsy benadryl sitting next to each other and i feel on cloud nine. :asleep::stare::angel::wasted: