I have a solution:
When you open Audacity, you should see a little drop down bar in the middle, probably with "Microphone" selected. Click the drop-down arrow, and you should get:
Wave Out Mix
Mono Out
Phone
Line In
Microphone
CD Player
The way I do it, I select "Wave Out Mix". Now, the program should record every sound that comes out your speaker, in relatively good quality.