Build your own Audacity for Windows with ASIO driver support
!!NB!! This builds Audacity 3.3.3 by default. If you want 3.4.2 then use "build-audacity.cmd -v3.4.2" Other versions are unlikely to build due to project changes.
Due to licensing restrictions the Audacity team cannot provide a prebuilt version with Windows ASIO driver support. But with this guide and script you can easily build your own Audacity with ASIO support.
Drivers are the glue between an audio program like Audacity and external hardware like a mixer or sound interface. The drivers usually used on Windows have limitations which can be overcome if you use ASIO drivers for your hardware. Specifically, low latency (delay) and multi channel support are available with ASIO drivers.
The Audacity program is the "go to" solution for many audio recording and editing tasks. However, unlike many more advanced DAWs, it doesn't support Windows ASIO drivers "out of the box". Fortunately, Audiacity's standard MME support is fine for most uses. That said, common reasons for needing ASIO include using digital audio or music equipment that only comes with ASIO drivers, such as Behringer mixers (which actually suggest using the less efficient ASIO4ALL ASIO to WDM bridging driver). Another common reason is to take advantage of the low latency or multiple channels supported by ASIO. Note that Audacity really is not a good multichannel solution, so if that is required a DAW might be a better bet.
While it is possible to build your own Audacity with ASIO support by following the instructions this usually requires considerable technical skills.
But have no fear, the instructions and script provided here make it easy to build your own version of Audacity with ASIO support. You just need a suitable Windows PC. The script installs all required tools and builds a 64 bit release version of Audacity with ASIO for you using the official build instructions.
NB. If you do use this to build Audacity with ASIO support you must not redistribute it due to the ASIO SDK licensing terms - see below.
Here's a brief blog post explaining why I needed ASIO and it includes a screen shot. But note, since writing that, I discovered my McMillen K-Mix digital interface mixer facilities alow routing of inputs 3 & 4 to the main outputs on 1 and 2 so can use the default MME Audacity build after all. For playback from PC, I found the HiFi Driver and ASIO Bridge from VB Audio lets me re-route PC audio out to channels 3 & 4 on the K-Mix, Leaving Channels 1 & 2 free for instruments and Mics.
Licensing
The reason for Audacity's lack of ASIO support is licensing, not technical. Steinberg do not alow the ASIO SDK to be redistributed (as required by open source projects). In addition, Audacity is GPL licensed and so is incompatible with the ASIO SDK licence redistribution rules.
Detailed instructions
The script installs a set of development tools that are known to build Audacity. Due to the complex nature of such tools, any other versions of them on your PC may not work correctly. Thus this scipt should be run on a clean PC without any developer tools. No support can be offered otherwise.
If you would rather not install these tools (Git for Windows, Visual Studio, CMake, Python and Conan), or you already have versions of them or even if you are having build problems, you can install a virtualisation program and a matching Developer Virtual Machine from Microsoft. This will provide an isolated environment to build in, but will be slower. In most cases VirtualBox will be a good choice (import the Microsoft supplied .ova appliance file). The Visual Studio pre installed in the VM must be uninstalled first to avoid problems. Windows also includes an isolated Sandbox VM environment that is known to work as well. In both cases you can copy the built files to where they will be run from by sharing a folder with the VM.
This video by @Renamesk walks you through the process, but the tool installation method has changed.
- Ensure you have a PC (or VM) with Windows 10 or 11 installed.
- Make a new folder
C:\projects
. - Click on the 'raw' button at the top of the script (below) in this Gist.
- Use the browser Save As feature to save the script as
\projects\build-audacity.cmd
(be careful there's no ".txt" added at the end). - open a new Windows cmd terminal (Windows + R keys and then type
cmd
) - Type
cd \projects
and enter key. - Install required tools and build by typing
build-audacity.cmd
and enter (use -v3.4.2 if requred).- Follow the prompts, pressing a key to start each tool's installer (when previous has finished).
- NB for Visual Studio, make sure you check the "desktop development with C++" workload
- If you have a non English Windows or Visual Studio then you must also install the English language packs.
- Come back later - it will take at least 10 minutes.
- Audactiy will be launched to test it was built correctly.
- See the program location printed out at the end of the build so you can run it again.
- Optionally copy the specified folder to where you want to run Audacity from, optionally renaming it.
If you have any ASIO drivers installed for active connected hardware you should find ASIO is now available in the the Audacity driver selection combo box which probably currently shows 'MME' selected (you may need to show using menu item View -> Toolbars -> Device toolbar).
NB: The Audacity settings and preferences are stored in a folder "Portable Settings" next to the audacity program. If you want to use settings in the user's home directory then delete this folder.
When things go wrong
As with any complex software build there are many moving parts (including Windows itself) and things can sometimes go wrong. Here are some tips if you hit build errors.
If everyhting falls or you just want to shortcut lots of painful debugging then try a Microsoft Windows Virtual machine (VM) as mentioned above.
- make sure you have latest script
- make sure you are in a folder C:\projects in the cmd window
- ensure you are an administrator on your Windows 10 or 11 64 bit PC (ie not a organisational PC)?
- run the script with
--cleanall
and try again - uninstall all the tools and installers (Python, cmake, Visual Studio) and then reboot before trying again
- note having other versions of any of the tools installed may well cause problems - remove them
- ensure you ticked the specified options when installing Visual Studio and Python, reinstall if unsure
- read the error output - clues are often buried in reams of impenetrable text
- disable any Anti Virus - the built-in Microsoft one is usually not a problem
- if your PC is not English make sure you have EN language packs installed for Windows and VS
Thanks
- @diogodh for finding and fixing the bug with conan installations
- The Audacity team for an fantastic audio tool
Another idea: the issue leading to MSB8065 seems to be compiler dependent.
You could try to use another version of Visual Studio, i.e. 2019 instead of 2022.
To do so, uninstall all components (Python, cmake, Visual Studio and its installer), reboot and try again with a fork of Steves script, which I modified to choose the VS version:
https://gist.github.com/Giermann/c3f88ee2a147f9a688a2ca76e1334a54
Set VISUALSTUDIO_REL in line 34 to either 2019 or 2017 and then start from scratch with "--install" and so on...