I have earlier been able to record audio from my computer activity (Spotify and youtube for example) with the record function in Audacity. But now I get a pop-up message which reads; ""Error while opening sound device. Please check the input device settings and the project sample rate".

What can I do? I don't really know how to go about with checking any input devices or sample rates, simply because I don't really understand what I'm even supposed to look for.

Any help would be appreciated.

If it helps to know, I think this problem came after a LAN party with some friends (the only one I've been to in my life). I don't know if I connected some cables wrong, but everything else but this seems to function properly.
Quote by Kill A Kitten
You know that old saying: "Men who play bass in the band have the largest genitalia." Well, it's the same for women.
Quote by Cavalcade
IIRC Edit>Preferences or Ctrl+P opens preferences in Audacity. One of the sections has a list of audio devices; see if changing which one you use changes things.

the device is typically called stereo mix, i believe.

if you dont see it, go to control panel> hardware and sound> under "sound" - manage audio devices> record panel, right click in the window but not on a device, click show disabled devices.

then right click stereo mix and enable it.