Recording audio from another audio source

If I were to open up any audio recording program, the basic function is that I can click record, speak into a microphone, and then click stop, and that portion of audio is recorded to a file. How would that principle work if instead of audio coming into a microphone as the input, the input audio to capture would be audio playing from another audio file?

I know there is convenient method calls like Microphone.start() and Microphone.stop(), but I doubt that can be used without a microphone. If this is something I will need to use GetOutputData(), then I have no idea how to use that call.

I appreciate any help.

You can follow up on this here