I recently bought a new A/V Receiver, which supports digital audio via two connection types: optical and digital. So I connected my laptop via spdiff – optical to the receiver and the receiver was receiving Dolby Digital perfectly.
There was only one problem, I wanted to send stereo sound via Winamp in 5.1 signal too. After looking around the web for some plug-in, I found ATSurround. This plug-in can upmix stereo to 5.1 / AC3.
Just download it from free-codecs.com