For this you will need
Winamp or
Foobar2000 as a software music player. Winamp and Foobar2000 are far superior software music players than sh*tty iTunes and Windows Media Player, both are far more customiseable, both are far less resource hogging and both have superior support for a lot more audio files and audio-related features than both iTunes and WMP. Therefore I highly suggest 'moving' from iTunes or WMP to one of these players if you haven't done so already.
For people shifting from iTunes that have alot of .m4a and .acc files, both players support .m4a and .acc file playback natively.
Anyway, I'll better start explaining how to configure kernel streaming, starting with Foobar2000 followed by Winamp.
This is assuming of course that you've downloaded and installed either one of the two players

Note that your Foobar2000 template layout might be different from the screenshots (you can choose what layout you want upon install and you can always change it later).
This however doesn't affect the menu settings (which you can configure too by the way).
For ease of use however for this guide, all menu settings are the default ones.
Configuring kernel streaming via Foobar2000
* First download the Kernel Streaming Plugin and unzip the .dll file to your 'components' folder in Foobar2000.
This is usually 'C:\Program Files\Foobar2000\components' or whatever directory you installed Foobar2000 in.
* Open up Foobar2000
* Go 'File ---> Preferences'
* If needed, expand 'Playback' by clicking on the [+] symbol.
* Click on the word 'Output'
* Under 'Output Device', there should be a drop-down menu. Select the one which has '
KS: [Name of your soundcard] [Name of the PCI port you installed it in]'
* Under 'Output Format/Postprocessing', there is another drop-down menu. Change the output to '24-bit', as all X-fi cards can process 24-bit data.

* Click 'Save All' then 'Close' and then restart Foobar2000.
You're all done!
Sidenote: The 'Buffer Length'
Quote:
| This determines the length of data, in ms, to buffer. This can help avoid any playback skipping when working with other processes. Higher buffering can also lead to increased memory use as well however, as well as increased delay in certain processes being applied, e.g. changing volume will takes X ms to apply. For best performance and minimum delay you should set this as low as you reasonably can without noticing any playback issues. - A complete guide to Foobar 2000 - TechSpot |
Playback issues can include skipping, 'static' or the track not even playing at all. The higher quality your soundcard and CPU, the less chance of issues arising because of lowering the buffer length.
Mine's set at 250ms but this is purely optional and not essential for bit-perfect output.
Configuring kernel streaming via Winamp
Well, although I personally use Foobar2000, I admit that installing this in Winamp is slightly easier.
* Firstly, download the latest version of the Winamp Kernel Streaming Plugin (v.3.63 at time of writing).
* Unzip the .dll file and put it in the 'Plugins' folder of Winamp, usually C:\Program Files\Winamp\Plugins' or whatever directory your Winamp installation is in.
* Open up Winamp and go to Options ---> Preferences --> Output. Click on 'Kernel Streaming Output' and then click 'Configure' at the bottom of the Winamp Preferences box.
Select your soundcard under 'Output Device'.
Optional: I recommend ticking the 'Gapless Mode' box as well, as playback will not be interrupted between tracks. This is particularly useful if you're listening to an album track-to-track as a lot of albums are made to feel like one continuous track.
* Click 'Ok' and restart Winamp.