ASIO4All Explanation
Feb 6, 2007 at 3:08 PM Thread Starter Post #1 of 479

EnOYiN

Headphoneus Supremus
Joined
Jan 13, 2007
Posts
2,269
Likes
18
[size=small]Disclaimer: This article is partially outdated because there are newer and better versions of ASIO4All available right now. I will not continue to update this article because I lack the time (and the motivation) to do so.[/size]

Introduction:
This post will tell you a bit about how the audio architectures of XP and Vista work. It is however mainly meant as a guide to set up ASIO4All in XP. I can not say how much of a difference installing ASIO will make in your system. Some of you might not be able to hear even the slightest difference while others will hear a clear improvement. Obviously the more resolving your system is the more likely it will be for you to hear a difference. I can hear a small improvement when using ASIO instead of DS.

If you are using Vista I can't really recommend installing ASIO for playback solely any more because there are several tests which have shown that there is no audible difference between using the normal settings and using ASIO. (I'll try to find a decent link for you guys)

If you think I wrongfully copied parts of other guides and/or websites do not hesitate to PM and I will change it. The main thing I have been trying to do here is organise some data for others so it will be easier to understand the benefits and drawbacks of using ASIO for playback in XP.

I will start off with a bit of information and some terms I will be using throughout the rest of the guide.

Thank you for reading!


Bit-perfect:

Bit-perfect is how the audio will stream to your device. By using this you will have a more true reproduction of the actual medium. So you will get the exact reproduction of everything which has been extracted or played from the CD. This will include every error which was on the CD originally.
The quality of a sound card can have an effect on the quality of the output, even with bit perfect playback enabled. The timing and/or jitter can vary between sound cards, usually with the lower end sound cards having a higher likely hood of jitter.
The only thing changing this signal is your DAC. The quality of your DAC will still affect the actual output.


Kmixer:
The KMixer is a part of Windows that enables your computer to take multiple audio sources and play them back at the same time and at the same bit rate. The KMixer is also how Windows handles your volume control. Regular CD audio is 44.1 kHz. Many times, due to poorly written drivers, sound cards that will interact with the KMixer will cause this 44.1kHz data to be resampled to 48kHz. Obviously this will result in an undesirable result when trying to achieve the utmost in sound quality. The mixing algorithm as implemented by Microsoft has been shown in many cases to only have a signal to noise ratio of about 92dB. CDs have a signal to noise ratio of about 96dB (technically 97.5dB). The KMixer effectively reduces the data from 16bit to 14 bit.
To bypass the Windows KMixer you either need to use ASIO or Kernel Streaming.


ASIO:
ASIO stands for Audio Stream Input Output

ASIO is a professional audio standard that provides for a low-latency audio stream from the computer. ASIO bypasses the KMixer entirely. ASIO is used by the recording industry as a standard. You can get ASIO here:
ASIO4ALL - Universal ASIO Driver

There are other ASIO drivers than ASIO4All. Two of them are worth mentioning. USB-ASIO and ASIO2KS. Here are the links to their websites:
USB 2 Audio - low latency audio
ASIO2KS - Generic ASIO driver for WDM soundcards.

USB-ASIO is selling a program which will provide true ASIO. This program costs €59 / $76. It is better than ASIO4ALL, but it is far from free. If you are thinking about using it, I can advice you to test it first. You can download a trial version from their website.

Currently ASIO2KS is only available as beta-version. I have no idea whether this project is still alive or if it died a long time ago. The beta version does not provide true ASIO like USB-ASIO does. The beta-version runs 10 minutes without limitations. Afterwards every 30 seconds a one-second beep-tone will be played into all input and output channels.


XP Audio:
Here is a simple picture of how the audio-architecture in XP works:

XPAudio.png


As you can see only ASIO and OpenAL will go straight to the lowest level of driver and bypass everything else.


Vista Audio:

VistaAudioSimple.png


(updated): I made a simplified picture of the Vista audio architecture to avoid further confusion about it. This picture shows just one audio application. What should be clear about this is that for every single audio application lauched a seperate WASAPI instance will be launced as well. The original version of this image can still be found in this thread on page 17.

For people who are using either ASIO or OpenAL there will be no significant changes. However, there is quite the change in using Direct Sound. There is no possibility anymore to go straight from a Direct Sound application to the audio drivers or the hardware. This results in the following: no more hardware acceleration. The point of Direct Sound acceleration is to let the hardware process unmixed audio content. For more information you can go here. This link will take you to the Creative forums.

The meaning of the abbreviations used in this model:
WASAPI - Windows Audio Session API
API - Application Programming Interface
APO - Audio Processing Object
CPT - Cross Process Transport
KST - Kernel Streaming Transport

Not all soundcards are capable of bit-perfect output. Some of them will change the information even when it’s delivered to them bit-perfect. There is nothing you can do about this other than buying another soundcard.

You can adjust the volume when using ASIO. This will not affect the 'bit-perfectness' of your signal.


Kernel Streaming:
Kernel Streaming is just about the same thing as ASIO. It is Microsoft’s answer for being able to play audio files in a bit perfect format on a Windows machine. Kernel Streaming makes efficient real-time streaming of audio possible. However, Kernel Streaming is not an industry standard. ASIO will have many more supported plugins available for various media players. Kernel Streaming requires less CPU time than the regular 'wave out' method.


Setting Up ASIO4All:
Some soundcards have their own ASIO driver installed already. You should not install the driver again when this is the case. The cards that support ASIO natively are always better than cards which do not. True ASIO has no interference of the OS at all. You can skip this part and go on to to the part where the Foobar/WinAmp set-up is explained.

I am going to tell you how to set up ASIO4All for bit-perfect playback. Note that this is not a setup for recording and also note that I will be using version 2.7 here.

Start with installing ASIO4All. This shouldn’t be too hard. I expect you are all able to do this. I will continue with the configuration of ASIO4Alls Off-Line Settings. After you just installed the program the Off-Line Settings should look something like this: (it looks like this on my laptop)

pic1.png


Now you are going to configure it for bit-perfect playback. After you did this it should look something like this:

pic2.png


First click on advanced. Then make sure the following things are set to the right value.
The latency should be on 2048.
The latency compensation should be on 0.
Leave “hardware buffering” unchecked.
Set kernel buffers to 4.
Leave the AC97 functions unchecked as well.

Only enable the devices you want to use. I do not want to use the Realtek HDA, so I disabled it. I do want to use the USB-DAC, so I enabled that.


Setting up Foobar with ASIO4All:
This part will explain you how to set up ASIO4All with Foobar. I am using version 0.9.4.2. of Foobar and version 2.7 of ASIO4All.

Download the plug-in for ASIO from this site.

When you did this, unpack the file and place it in your components directory. Mine is called:
C:\Program Files\foobar2000\components

I am assuming you already installed ASIO4All like I explained above. Now you are going to File --> Preferences --> Output.

There should be a tab called ASIO Virtual Devices. Select it and add a new virtual device. Once you did this edit ASIO4ALL v2.
What you see now should look something like this:

pic4.png


I want to activate my USB-DAC so I mapped left and right on there. Press save all and you are done.

Go to the main output tab and select your output device. If you want to use ASIO4All then you should select the following:

pic3.png

Select ASIO: ASIO4ALL v2 as output device.


Setting up WinAmp with ASIO4All:
This part will explain you how to set up ASIO4All with WinAmp. This is so easy that it makes me wonder why I even use Foobar.
biggrin.gif


Download the plug-in for ASIO from this site. There is also another plug-in for ASIO. Some people haven't been able to get things to work with the plug-in which is linked here, so I will give you a link to a post made by Terry which contains a link to another plug-in. It's located here.

Install the plug-in.

Start WinAmp and go to Options --> Preferences --> Plug-ins --> Output.
Select ASIO4All and press close. It should look like this:
Note:I uninstalled all the other output plug-ins. You do not have to do this for ASIO to work.

pic5.png


Now restart WinAmp and everything should work fine.


AC97 Troubleshooting
Always Resample 44.1<->48 kHz
ASIO4ALL can do real time resampling of 44.1 kHz audio to/from 48 kHz. Resampling will automatically take place whenever ASIO4ALL is opened for 44.1 kHz and the WDM driver does not support this sample rate. There may, however, be instances in which case an AC97 will support 44.1 kHz by resampling internally. More often than not, however, AC97 resampling quality is extremely poor and/or prone to stability issues. To work around this, you can enable this option. With at least one incarnation of the SoundMax WDM driver (smwdm.sys), this option absolutely must be enabled in order to make it work at 44.1 kHz at all.

Force WDM driver to 16 Bit
This option only has an effect if the supported bit depth of the WDM driver is larger than 16, but less than 24. Some AC97 devices report e.g. 20 Bits resolution but cannot actually be opened for more than 16 Bits resolution. Should this be the case on your system, this option provides a workaround. Originally, this was introduced as a workaround for an issue with the SigmaTel AC97 WDM driver.



WEEHOO. You have just installed ASIO4All. If you’ve got any problems with it you can look them up in the instruction manual or post here in this thread.


FAQ:

Q: Will I still have bit-perfect playback when using DSPs?
A: No. It's all lost. Down the drain. (In my opinion however, an EQ might make more of a difference than bit-perfect output.)

Q: My .wav file doesn’t work. Why Oh Why?
A: A .wav can only be played bit-perfect if it has the following specifications:
- Stereo format
- PCM audio data
- Min: 16-bits Max: 32-bits.
- 44.1, 48, 96 kHz

Q: My volume is not what it’s supposed to be. How can I fix this?
A: Windows is changing the volume sometimes, just for fun. You can change this in the menu “Sounds and audio devices” in your configuration window.

Q: Does device X work with ASIO?
A: I simply do not know everything. I suggest you look up the specifications on the particular device to see if it supports ASIO natively and if so just download the ASIO plug-in for Foobar. If it does not support ASIO natively than I suggest you download ASIO4All and the plug-in and try that. The only way to be sure is to try.



Resources:
FAQ: What is Bit-Perfect? - MP3Car.com
Winamp 2 Kernel Streaming Output Plugin - Hydrogenaudio Forums
Perfect Volume Control? - Hydrogenaudio Forums
Envy24HT-S - The Definitive Source - AVS Forum
USB 2 Audio - low latency audio
ASIO4ALL - Universal ASIO Driver

Suggestions are welcome.

Cheers.
 
Feb 6, 2007 at 3:20 PM Post #3 of 479
I believe pasted images are limited in size. Best way to get images in a post is to get them on a server somewhere, then link to them with an html tag (this is automated with the
insertimage.gif
image icon when editing or creating posts.
 
Feb 6, 2007 at 3:43 PM Post #5 of 479
Thanks for organizing the info and posting here. It'll come in handy when I reinstall the OS on my notebook later this week.
 
Feb 6, 2007 at 6:05 PM Post #9 of 479
Quote:

Originally Posted by EnOYiN /img/forum/go_quote.gif
I made this thread because a lot of people asked about this subject. And I rather make a good thread than explaining it over and over again. Thx.


Excellent job, EnOYiN. This should benefit any first time user who doesn't have patience or experience to diy.

Quote:

Originally Posted by Cid /img/forum/go_quote.gif
You might want to include that if your soundcard supports ASIO you don't need to use ASIO4ALL (Just the foobar plugin is enough). I think that's confusing a lot of people.


Good point, Cid. I believe many are confused by this, and start messing about with ASIO4ALL when they don't need to.
 
Feb 6, 2007 at 6:16 PM Post #10 of 479
Quote:

Originally Posted by Cid /img/forum/go_quote.gif
You might want to include that if your soundcard supports ASIO you don't need to use ASIO4ALL (Just the foobar plugin is enough). I think that's confusing a lot of people.


Added it. Thank you for pointing that out.
 
Feb 6, 2007 at 6:29 PM Post #12 of 479
Nice post here! It might be worth adding to that, as good as ASIO4ALL (and ASIO2KS) are, they are still wrappers which at some point use the OS audio stack. If your device supports true ASIO it would be superior as it allows the application to talk directly to the hardware, bypassing any kernel interference.
 
Feb 6, 2007 at 6:30 PM Post #13 of 479
Quote:

Originally Posted by floydenheimer /img/forum/go_quote.gif
I nominate this for sticky-ization.

Great guide!



I think it's way to early for something like that. There should at least be a winamp section. (which I am working on right now) And some troubleshooting/FAQ kinda thingemabob thingie.

Thank you either way.
 
Feb 6, 2007 at 9:15 PM Post #14 of 479
Sure it isn't all-encompassing, but it's easy to follow and answers an oft-asked question. More work can be done to improve it pre or post-sticky.
wink.gif
 
Feb 6, 2007 at 9:56 PM Post #15 of 479
When I start playing music on winamp through the asio plugin (otachan), the asio4all (v2.7) offline settings control panel says that my alien dac is "beyond logic". Is this normal? everything seems to be working fine, and the volume control in windows doesn't affect the volume level.
 

Users who are viewing this thread

Back
Top