I discovered a neat trick you can do with PulseAudio: redirect the audio output of your computer to the microphone input, so that any application that supports recording from a mic will get your audio output instead.
I needed to do this because I was testing something at work that involved an Asterisk server calling a softphone running on my Linux box, and it wanted me to record a voice prompt and then hang up. This computer didn't have a microphone installed, so I started looking for a way to fake the mic input and make it record an MP3 or something instead.
If your system is using PulseAudio (every recent Fedora and Ubuntu distribution does), the steps to follow are:
1) Open PulseAudio Volume Control
pavucontrol on the command line, and in Fedora is provided by the package
Go to the "Input Devices" tab, and select "Show: Monitors" from the bottom of the window. If your computer is currently playing audio, you should see a bar showing the volume of the output:
2) Start running an app that is recording audio, and go to the "Recording" tab and see if your app is listed.
In this screenshot I'm running Audacity and recording audio.
3) Click the input device button ("ALSA Capture from") and pick "Monitor of Internal Audio Analog Stereo")
And that's pretty much it. If you see volume bars on the Recording tab now then it's probably working, and the recording app is now recording your audio output.
Here's a full desktop screenshot of me running `
play audiodump.wav` (a WMA-to-WAV conversion of the Windows XP Welcome Music) in a terminal, the PulseAudio Volume Control running, and Audacity recording from the mic.