WDM audio filter driver

I would like to write a software Dolby Digital encoder for my Aureal Vortex 2 soundcard (but the principle is the same as for Creative cards), because I can only
connect my Digitheatre DTS speakers via S/PDIF- they don’t have 6 analog inputs. I found some source for the encoder on the web (ffmpeg). I need to write a WDM
driver, that takes in PCM stereo and multichannel data, and encodes it to AC3 sending it to S/PDIF. I need to fool Windows into believing that I now effectively
have a 6 channel speaker system (Dolby Digital) instead of a 4 channel one (the Aureal card). I have identified that I need to write a WDM filter driver that will
intercept sound going to the soundcard. Do you have any experience in this area? I would be extremely grateful for any advice, source code etc. you can give me.

Cheers,
Mike