I have a stereo system hooked up to my Mac mini, but sometimes I'll play music from my laptop. Is there any way for the Mac mini to be recognized as a speaker and allow me to output sound to it (and the speakers connected to it) from my laptop without paid solutions like Airfoil?
This isn't free, but it's only $2.99 AirServer
Currently streaming from iTunes is only supported to Apple TV and Airport Express speakers. (Thanks @Jonathan)
You could try a pretty ugly hack of using home sharing to access your laptop music library from your Mac Mini and then control the playback by using vnc or some other remote desktop app to control playback on the Mini from the laptop.
Try Erica Sadun's AirPlayer. That might very well work. :)
There is a free utility called shairport which acts as an airport express. If your computers are on the same network, you can use it to stream music between the two, as iTunes will see the computer it is running on as airplay speakers. I recently used it to stream music from my iPod to my computer.
If music only, there are a lot free options. shairport is a great choice, open source, support almost all platforms.
If you also need mirroring, most free tools are broken since iOS9.
check this one: lonelyscreen. It is free. Only for mac and windows, no linux. And it can capture and save iOS mirroring. I don't use that much, but it is very convenient sometimes.