Successful Build of Audacity v3.4.2 with ASIO on Windows 7

For anyone still using Windows 7, I thought I’d recap the steps I took to build Audacity v3.4.2 from source, including support for ASIO, using CMake and a minimal install of Visual Studio 2019 Community Edition.

I got into this after investigating how to interface Audacity with VST instruments using a VST host and virtual MIDI cables (which I’ve barely started). There seemed to be a general consensus that, in this application, if you have an ASIO driver available, you should definitely use it (particularly a ‘native’ one… in my case, RealTek ASIO included with Dell-installed audio drivers on my laptop).

But, as you’re all no doubt aware, if you want ASIO support in Audacity, you have to build a custom version from source code.

The principal links I used to get going were:
ASIO Audio Interface
Building Audacity
and a previous Audacity forum post:
https://forum.audacityteam.org/t/building-3-4-2-windows-with-asio-worked-eventually/95095
[Couldn’t put the direct link to the forum post… as a newbie, I’m only allowed two hyperlinks in a post!]

None of the above links, either alone or in combination, was sufficient for me to produce a successful build, although roadsterUK’s forum post (hat tip) certainly got me headed in the right direction.

This was the development environment:
Windows 7 64-bit Home Premium
Git 2.43
CMake 3.28.1
Python 3.8.10
Conan 2.0.17
Visual Studio 2019 Community Edition v16.11.33 (C++ development tools only)

This was the git clone command:

git clone -b release-3.4.2 https://github.com/audacity/audacity/ Release3.4.2

I had no luck using the CMake gui, so, like roadsterUK, I used the command line to perform the CMake configuration/generation. However, the command itself differed substantially from his/hers. I used:

cmake -G "Visual Studio 16 2019" -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_CONFIGURATION_TYPES=Release -Daudacity_has_asio_support=On -DAUDACITY_BUILD_LEVEL=2 -S .\Release3.4.2 -B "C:\Program Files\Audacity"

The critical option I needed was -DCMAKE_SYSTEM_VERSION=10.0, which essentially tells Visual Studio to use whatever the most current installed version of the Windows 10 SDK is, not the Windows 8.1 SDK, which is what it would use (and fail with) if this option were not specified. Visual Studio 2019 CE currently installs Windows SDK 10.0.19041.0 by default.

I also did not turn off ffmpeg (using -Daudacity_use_ffmpeg=off) as roadsterUK did. My resulting Audacity build was correctly integrated with FFmpeg as expected, and the FFmpeg import/export library was already located and listed under Edit/Preferences/Libraries.

Following completion of the CMake command, it was simply a matter of opening the resulting Audacity.sln file with Visual Studio and executing Build Solution. Note that if the target directory of the CMake command is in C:\Program Files (as it is in mine), you have to run Visual Studio as Administrator to do this.

The resulting build of Audacity shows ASIO as an available audio host, and when it is selected as such, I’m able to select RealTek ASIO as the recording and/or playback device. Success!

Note that I did not install the Steinberg ASIO SDK as suggested in the ASIO Audio Interface manual page linked above. Audacity certainly builds and runs without it, but perhaps some capability(s) are missing as a result? If anyone has insight about that, I’d appreciate any info.

I am having problems with the de clicker or mastering a audiobook. Every time I apply it freezes about half way thru the process. It runs fine when I am doing a 30 sec to 1 min recording for possible commerical work.