Kernel module
To get sound working you need to have the proper kernel module loaded for your sound card, which means first figuring out what kind of sound card you have, then finding the appropriate module to have loaded.

To see what kind of sound card the kernel saw at boot up, use the dmesg command:

Loading the driver will (in FreeBSD 5.x or later) usually create the /dev/dsp sound device entry for you. If it exists, then try to send some noise to it:

# cat ~/.profile > /dev/dsp

If this works, then you’re done. All sound aware apps should pick this up and use it for sound.

Creating /dev/dsp sound device

In the case that the /dev/dsp device does not get created automatically after a reboot, as was my case because I have multiple sound cards, (one on the main board, one on the video card) try the following:

Figure out which of the existing /dev/dsp* devices to use. I ran the following loop:

# for d in /dev/dsp*; do echo $d; cat ~/.profile > $d; sleep 1; done

6 times, with the speakers plugged into each of the 6 different ports in the back of the machine. Eventually I figured out it was /dev/dsp1.0 and the lower middle yellow port.

To put that info into place, I ran:

# sysctl hw.snd.default_unit=1

Surprisingly, a /dev/dsp was not created, but Skype started making sounds at me, so it worked!

To make that permanent I added the following to /etc/sysctl.conf

# to make /dev/dsp point to /dev/dsp1.0
hw.snd.default_unit=1

After the next reboot, the /dev/dsp device was there and sound still worked.