Installing ASIO in Audacity

Official releases of Audacity do not support ASIO. Due to license restriction, Audacity cannot legally be distributed with ASIO support enabled. For more information, see here: Missing features - Audacity Support

Latency should never be a problem in Audacity. If it is, then you are probably doing something wrong. Have you started a forum topic about this problem?

Yes I raised a forum thread - but I am always tinkering with latency adjustments and timeshifts and it’s tiresome when you just have to lay some tracks down for a client.

This post - is it offering a way of plugging ASIO support into Audacity?

Once latency correction has been set up correctly, there should be no need for fiddling until you change the recording device, the host setting, or the sample rate. For normal use it’s just set it once and that’s it.

If you post a link to your other topic I’ll take a look and see if I can see what the problem might be.

To enable ASIO support in Audacity you need to build Audacity from the source code. Unless you have experience building C++ applications from source code, it’s no small task.
There’s some information about building from source here: Missing features - Audacity Support
but we are currently in the middle of an upgrade which will result in different instructions for Audacity 2.3.0 (the current development code).

ASIO is NOT required by Audacity. The main reasons for building Audacity with ASIO support are (a) If you have a multi-channel sound card that requires ASIO for multi-channel recording, (b) you are using other audio software that uses ASIO and wish to use Audacity with the same audio device at the same time. If neither of those cases apply to you, then you probably don’t need ASIO.

Thanks Steve:

We resorted to time shift all the tracks in the end with Audacity :slight_smile:

I’ve replied here: URGENT - Focusrite Scarlett 2i2 "latency" issues - - #12 by steve

Previously I had a hard time building Audacity, but with the latest 2.3 code that works with the default wxWidgets it was actually very straight forward to build it with just the latest Visual Studio.

Which brings me to the following:
It should be pretty easy to build a docker image based on microsoft/windowsservercore with VS Build Tools installed which then at runtime does:

  1. Checks out wxWidgets source
  2. Checks out Audacity source
  3. Downloads ASIO SDK
  4. Builds wxWidgets
  5. Builds Audacity
  6. Zips the output and writes it to a mounted volume

A simple docker-compose up + about 1 hour wait should then be enough to get you a ready to use Audacity with ASIO support. Because nothing ASIO related is distributed inside the image but rather it’s downloaded when the user runs it this could be legally ok to do.

I have experience with building VS solutions in docker for windows containers so I can build the docker image. But I’m not 100% sure if this approach is legal. Any thoughts?

I can’t comment on the licensing/copyright aspects of this but if you wanted to do it this way for your own convenience then why not have a go. But I don’t think its reasonable to ask the Audacity development volunteers to take on another task which could be a procedural nightmare every time something changes. If you look at the fork created by Henricj you will see that he has produced a similar integrated scripted build but if you have tried it you will know that many things can go wrong and in the end breaking down the build into individual steps is a more foolproof approach because its easier to identify which step has gone wrong.
Audacity’s greatest asset is the contribution of individuals to its ongoing development, and if we are lucky enough to get a version 3.* there will be huge amounts of work in improving or replacing the partner elements such as wxwidgets and portaudio so distractions could be unhelpful.
Finally, as an ASIO user whose hardware currently dictates that I am very dependent on it for recording, I suggest that it may now have a limited life-span remaining as OS built in capability improves. So in a few years time the licensing and dependence on Steinberg may no longer be relevant.

No no of course the Audacity team shouldn’t care about it, they have work enough with the actual app.
The idea was to provide a way to get it with ASIO for users without any programming experience, because for them it’s not virtually impossible to get it.
I’ll maintain the image + a GitHub repo with a script so it should be pretty turnkey for the end users:

  1. Install docker for windows and select windows containers.
  2. Run script
  3. Eat cake

you will know that many things can go wrong and in the end breaking down the build into individual steps is a more foolproof approach

This will be ok. If the build script uses a specific commit hash of wxWidgets/Audacity that I have tested to work on the Docker image then it will work for everyone. That’s what Docker is for: the environment in which the code is built is the same on every machine in the world. The “it (does not) work on my machine” problem is in 99.999% of the cases completely gone. This is a key difference with the other script.

You would need an addition part to step 3 for it to comply with Steinberg’s license:

3a. Prompt user to sign Steinberg’s “non-distributable license” agreement.
3b. Downloads ASIO SDK from Steinberg.

I recall asking the developer’s a similar question some years ago. Docker did not exist back then, but I think the reply that I got is still relevant.

I asked why there couldn’t be an executable script for users to download and run, which would download the necessary source code and build Audacity. The reply was, that once a working development environment was set up, building Audacity on Windows is actually highly automated and very easy - the part that causes the trouble is getting the development environment set up and working.

Unfortunately, Windows does not provide a development environment by default, so most users will need to download and install several very large packages from Microsoft, including C and C++ libraries, a compatible version of MSVC, compatible SDKs and so on. The exact steps can vary from one machine to another, but perhaps Docker could simplify this?

Adding in a lincense agreement can be done and is on my list.

The hard part of setting up the environment and everything that can go wrong is exactly what Docker solves. The image acts kind of like a VM with all tools baked in. I’ll just get everything ready (give me a few days) and then it will probably be clear for those who have never worked with it.

And we’re ready:
Instructions in the readme which GitHub should nicely show you by default.

I build audacity on windows…it runs. I downloaded the ASIO SDK and saved it.

Here is the part I do not understand. At what point did I compile ASIO into Audacity? audacity is already built. The only instructions I see is

  1. Install SDK in c:\asiosdk

  2. Create environment variable ASIOSDK_DIR and point it to the dir

I did that…ran Audacity, and I do not see ASIO in the choices for Devices.

What step am I missing?


To use ASIO with Audacity, you need to “build” ASIO support into Audacity. So, after setting up the ASIOSDK_DIR environment variable:

  1. Reboot
  2. Launch MSVC and open the Audacity sln
  3. Clean the build
  4. Build Audacity (again)

I’m trying to build Audacity with ASIO support. I have some development experience with Visual Studio but I’m not anywhere close to being an expert. I think I got through it but how do I know?

I’m going through all this so that I can record 4 channels at once from a Behringer UMC404HD which presents itself to Windows as two devices, one for channels 1 & 2 of the interface, and one for channels 3 & 4. What I expected is that I would open Audacity and find a device with ASIO in the name and the ability to select 4 channels. That didn’t happen. No new devices are presented. What am I missing? What SHOULD I see as available devices when I have a successful build? Does ASIO work through some other construct?

Did you check if 4 channels are available with “host” set to “WASAPI” in the device toolbar?

“Did you check if 4 channels are available with “host” set to “WASAPI” in the device toolbar?”

Yes, I checked that and they aren’t because the next item to select is the device. The Behringer presents itself as two devices, one with inputs 1 & 2, and one with inputs 3 & 4. Each of these provide mono or two channels.

I located an older version of the driver for the Behringer which presents as a single device capable of 4 channels BUT it is buggy. I am able to select it once and record in 4 channels but as soon as I stop recording, I can’t record (or play) again. An error pops up claiming a bitrate mismatch (or something more generic). No idea how to resolve that as everything seems to be in order. A restart of Audacity is the only thing that gets it back on its feet.

So I’d like to use ASIO. But in the version I tried compiling, no extra hosts appear. Should one? I don’t know what to look for. I don’t know if a helper like ASIO4all is needed.

Have you installed the ASIO drivers for the UMC404HD and rebooted?

Stan, thanks much for building this! I’ve downloaded everything and ran the script; it came back with this error:

Starting Docker container to build Audacity with ASIO support
Unable to find image ‘asio:latest’ locally
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: pull access denied for asio, repository does not exist or may require ‘docker login’.
See ‘C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help’.

I am signed into Docker. Any ideas? And thank you.

I have not “compiled” before, as I read of in these exchanges…I should have a vanilla version, as I have never altered or embellished my Audacity. I’ve downloaded ASIO. I have these components. What now? Please Lucy,-'splain.