NOTE: This isn't something that would use a mic. I want to INTERNALLY record audio.
I would like to write a program in C# or Java that records audio data sent to the speakers in my computer. The end product would allow the user to hit a "record" button, and anything being played at the moment would be recorded internally until the user hits the "stop" button, at which point all data collected is saved to an audio file like a wav, mp3, etc.
I have a MacBook Pro that runs Windows 7 in parallel. I have access to several PCs, so I also can work on a pure Windows platform. Ideally it wouldn't matter what platform, though.
I have no idea where to get started--the most I've ever done with music is to play a .wav file in Java. If anyone has any advice, references, suggestions, technology preferences for either language, etc., I'd love to here it!