You can get 5.1 surround sound out of your iMac if it's pre-encoded. If you play a DVD with dolby digital, it will be true 5.1.
However, if you want to play games in 5.1 on a mac running windows, You'll have to use a mac pro and install a sound card that supports hardware-encoding like a Creative SoundBlaster X-Fi.
Unfortunately, macs just can't real-time encode ac3 or DTS.
This is what I did to get surround sound,
- Use a Mini Display Port to HDMI cable and connect the HDMI into the HDMI input on the receiver and the Mini Display to the Mini Display Port on your Mac.
- Go to System Preferences on your Mac. Click on the "Sound" icon. Then in the "Output" tab, select your Surround System from the menu
- Then go into Applications > Utilities > Audio MIDI Setup. On the left side of the window select HDMI. On the right side it then should say "Source: (your speaker system)"
- Click the "Configure Speakers..." button in the bottom right of the window. Click the "Multichannel" tab. Then select "5.1 Surround" from the pull down menu. Click on each speaker to provide a test tone to make sure each is connect properly. Then click on "Apply"
- Last set is to go into the DVD Player. Go to "Preferences" and click on the "Disc Setup" tab. Under Audio at the bottom of the window select "Digital Out - (your speaker system)" from the drop down menu for "Audio output"