
This short howto will show how to record the soundcard output on Linux with Audacity while running in KDE.
Before we start, one honest word: generally, I have no idea about audio routing on Linux. So to an expert this method might look very childish or just plain cumbersome – still, it is the only I figured out for the given task. Also, it worked here, but it might not work for you when you have another soundcard or whatever.
The task
The given task was in this case: record the output of a flash streaming online radio. In principle this shouldn’t be difficult because the data are on your computer – you just have to route them through a recording tool.
However, this is the point which is a bit odd: how do you route sound? And, also difficult at least on KDE, which recording tool can you use? I never really understood krec, so that was out of question. Also, it seems to require artsd, which infers with the flash plugin which uses Alsa.
The first solution I found didn’t work out: the man page of asound gives code snippets to do this task. However, it didn’t work for me, and the net was only full with people where it didn’t work either, so no chance there.
Also, jack might can accomplish such tasks, but I haven’t tried that.
The solution
So I checked for audacity – luckily, Fedora comes along with the newest beta of audacity which already include Alsa support – the old Audacity was OSS only which is certainly not helpful in such cases. So if you want to follow this hoto you need an Alsa supporting version of Audacity (v. 1.3.x).
Once you started Audacity, you should turn on the record signal to see if the record channel gets a signal or not:

If you have done so you can see all the time if the software gets the signal or not. This is very helpful in case you have to play around with the different in- and outputs of the mixer.
Start now any kind of audio source, and see if you have a signal there – if yes, record it and say something in the microphone at the same time. Listen to it – if you hear your own voice, then you simply record your microphone (which is quite likely).
But we want to record directly from the output. Therefore we route the sound with kmix: Open the kmix window and open the tab switches. There, activate a switch called “Mixer” by clicking the red light on top of the switch:

Now check in Audacity if you get a good signal:

If you see a strong signal, record it and speak into your microphone at the same time – you should not hear your own voice at playback.
And that’s all you have to do. The biggest disadvantage at the moment seems to be that Audacity can only record in plain data instead of live coding into OGG/mp3 – and that you start a full blown audio editor just to record some data.
Still, it works, and audacity is very easy to understand and handle. Therefore, enjoy it.
Update
Thankfully E@zyVG covered this post as well and there Gavin mentioned in a comment how to reach the same goal in Gnome:
“Instead of opening kmix, go to the sound icon in the panel and right click it, choosing “Open Volume Control”.
Under the Switches tab, you’ll find a “mix” checkbox and a “mono mix” checkbox. These are equivalent to the mixer button in kmix (only one is mono).”