Skip to content

Instantly share code, notes, and snippets.

@SteveALee
Last active September 3, 2023 12:14
  • Star 19 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Build audacity with ASIO support on Windows

Build your own Audacity for Windows with ASIO driver support

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 3.3.2.

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 have 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 use the less efficient ASIO4ALL ASIO <> 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 checks all required tools are installed and builds a 64 bit release version of Audacity 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

If you'd rather not impact your PC by installing everything described here you can install VirtualBox and use a Microsoft supplied Virtual Machine image as explained here.

Note for developers: These instructions assume a clean PC with no dev tools. If you have existing tools you may hit errors due to differing versions. Perhaps use a VM (difficult with Windows licencing) or a Windows container.

This video by @Renamesk walks you through the process, but the tool installation method has changed.

  • ensure you have a PC with modern Windows installed. 11 and 10 are known to work but 7 and 8 should too.
  • install "Git For Windows" - click the "download" button.
  • 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")
  • open a new Windows cmd terminal (Windows + R keys and then type cmd)
  • type cd \projects and enter key
  • install required tools by typing build-audacity.cmd --install and enter.
    • 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 VS English language pack.
  • when the install completes open a new cmd terminal and start the build by typing build-audacity.cmd and enter.
  • come back later - it will take at least 10 minutes
  • Audactiy will be launched to test it was built correctly
    • to it run again see the program location printed out at the end of the build
    • or 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 shows 'MME' (you may need to show using menu item View -> Toolbars -> Device toolbar).

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.

  • make sure you have latest script
  • run the script with --cleanall and try again
  • uninstall all the tools (Python, cmake, Visual Studio and its installer) and then reboot before trying again
    • note having other versions of any of the tools installed may well cause problems - remove them
  • 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

Thanks

  • @diogodh for finding and fixing the bug with conan installations
  • The Audacity team for an fantastic audio tool.
@echo off
rem Build audacity with ASIO support on Windows
rem See the following gist for details
rem https://gist.github.com/SteveALee/da24c2be633340b8791066dd98eb5d0b
rem
rem Options (only one may be specified)
rem
rem --install - install tools
rem --clean - remove built files
rem --cleanall - remove fetched and built files
rem --getonly - only get the files
rem --noget - don't fetch again from git
rem --gui - run cmake-gui
rem
rem MIT licence
rem steve@opendirective.com
SETLOCAL
set AUDACITY_REL=3.3.3
set VISUALSTUDIOVER=2022\Community
set VISUALSTUDIOCMAKE=Visual Studio 17 2022
set VSDIR=%ProgramFiles%\Microsoft Visual Studio\%VISUALSTUDIOVER%
set PROJROOT=C:\projects
set AUDACITY=%PROJROOT%\audacity
set AUDACITY_BUILD=%PROJROOT%\audacity-asio
set EXEDIR=%AUDACITY_BUILD%\Release
rem check projroot exists
if /I not [%~dp0] == [%PROJROOT%\] (
echo.
echo Error: This script must be run in %PROJROOT% - see %%PROJROOT%% in file
echo.
if not exist %PROJROOT% (
echo Create %PROJROOT
goto exit
) else (
echo cd to %PROJROOT%
goto exit
)
)
if not [%1] == [--install] goto clean
rem Get tools
rem ANSI escape sequences do not work in if () block so we use goto
set cmake-url=https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-windows-x86_64.msi
set vs2022-url=https://aka.ms/vs/17/release/vs_community.exe
set python-url=https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe
echo 
echo.
echo Fetching tools..
echo 
mkdir bin 2> :null
curl -L %cmake-url% -o bin\cmake.msi
curl -L %vs2022-url% -o bin\vs.exe
curl -L %python-url% -o bin\python.exe
echo 
echo.
echo Installing tools...
echo.
echo IMPORTANT!! Follow the instructions below for each installer
echo Close each installer when it is done
echo.
echo CMake: make sure you select "add cmake to system PATH"
pause
bin\cmake.msi
echo.
echo Visual Studio: make sure you select the Workload "desktop development with C++"
pause
bin\vs.exe
echo.
echo Python: make sure you select "add python.exe to PATH"
pause
bin\python.exe
echo.
echo.
echo This window will now close!
echo Open another "cmd" window (Wnd + R, cmd) and run "%0" again in "\projects" to build Audactity
echo 
echo.
pause
exit
:clean
if not [%1] == [--getonly] (
if /I [%1] == [--clean] echo Cleaning built files... & rmdir /s/q %AUDACITY_BUILD% 2> :null
if /I [%1] == [--cleanall] echo Cleaning source and built files... & rmdir /s/q %AUDACITY% %AUDACITY_BUILD% 2> :null
if /I [%1] == [--cleanall] where /q conan & if ERRORLEVEL 0 echo Cleaning conan modules... & conan remove -f * 2> :null
)
rem Launch cmake-gui
if [%1]==[--gui] cmake-gui -Daudacity_has_asio_support=On -DAUDACITY_BUILD_LEVEL=2 -S %AUDACITY% -B %AUDACITY_BUILD% & goto build
rem ensure tools are installed
if not [%1] == [--getonly] (
rem NB this sets 64bit arch for cmake
if not exist "%VSDIR%\VC\Auxiliary\Build\vcvars64.bat" echo Error: Install Visual Studio %VISUALSTUDIOVER% & goto exit /b
if not defined VisualStudioVersion call "%VSDIR%\VC\Auxiliary\Build\vcvars64.bat"
where /q cmake & if ERRORLEVEL 1 echo Cmake does not appear to be installed & goto exit /b
where /q python & if ERRORLEVEL 1 echo Python does not appear to be installed & goto exit /b
where /q conan & if ERRORLEVEL 0 pip show --version conan | findstr /R /C:"Version: 1.59.0" & if ERRORLEVEL 1 echo uninstalling conan & pip uninstall -y -q conan
echo installing conan 1.59
where /q conan & if ERRORLEVEL 1 pip install conan==1.59.0
)
rem Get source code
set getsrc=0
if /I [%1] == [] set getsrc=1
if /I [%1] == [--getonly] set getsrc=1
if /I [%1] == [--cleanall] set getsrc=1
if /I not [%1] == [--noget] (
where /q git & if ERRORLEVEL 1 echo Error Install Git for Windows. Choose the option "Git from the command line" && goto exit /b
if [%getsrc%] == [1] (
echo.
echo Fetching code for Audacity %AUDACITY_REL%...
echo.
git clone -b Audacity-%AUDACITY_REL% --depth 1 https://github.com/audacity/audacity/ %AUDACITY%
if ERRORLEVEL 1 echo Error: cannot fetch the Audacity code. Try the --cleanall or --noget options & goto exit
if not exist %AUDACITY%\CMakeLists.txt echo Something is wrong with %AUDACITY% files & goto exit
)
)
if /I [%1] == [--getonly] goto exit
echo.
echo Building Audacity %AUDACITY_REL% 64 bit release with ASIO support...
echo.
cd %AUDACITY%
cmake -G "%VISUALSTUDIOCMAKE%" -DCMAKE_CONFIGURATION_TYPES=Release -Daudacity_has_asio_support=On -DAUDACITY_BUILD_LEVEL=2 -S %AUDACITY% -B %AUDACITY_BUILD% & if ERRORLEVEL 1 echo Error: Cannot create Audacity buildfiles & goto exit
:build
cd %AUDACITY_BUILD%
set msbuild="%VSDIR%\MSBuild\Current\Bin\MsBuild.exe"
%msbuild% audacity.sln -t:Audacity -p:configuration=Release
if ERRORLEVEL 1 echo Error: cannot build Audacity & goto exit
cd %PROJROOT%
rem All done
echo 
echo.
echo Congratulations!
echo Your new Audacity with ASIO support will now launch.
echo The ASIO options will appear if you have ASIO drivers and connected hardware
echo In future just run the audacity.exe. No need to install.
echo.
echo %EXEDIR%\audacity.exe
echo.
echo Or copy the folder
echo.
echo %EXEDIR%\
echo.
echo and run the included audacity.exe
echo.
echo 
start %EXEDIR%\audacity.exe
:exit
cd %PROJROOT%
ENDLOCAL
@haberl333
Copy link

Thanks @SteveALee, your code encouraged me finally to try to build Audacity with Asio support. I always feared to install so much software only to create a program only once on my limited computer. Finally I used a Win11 virtuell machine offered by Microsoft (https://developer.microsoft.com/de-de/windows/downloads/virtual-machines/) using Virtualbox that needs a lot of Gigabytes but includes Visual Studio 2022. In this virtuell machine I only needed to install Git, CMake und Python to run build-audacity.cmd. That worked well for me.

@SteveALee
Copy link
Author

@haberl333 fantastic! That was a great thing to find out and I hope you enjoy it. I did not realise Windows VMs were available, thinking licencing would be a blocker. Those dev VMss are really useful. Using VMs or more recently, containers, are vital if you arexworking on lots of projects and I like how you suggest also keep all those tools from cluttering up you PC. I'll add a note. Thanks again

@mapper14
Copy link

mapper14 commented Feb 5, 2023

@dolfff Agree - it's a bit sidelined right now and ASIO is common. Wish I had bandwidth to help drive it a bit.

Amazing, it worked!..Now I can use Audacity-ASIO to connect with my Mackie ProFX V3 USB mixer; these newer V3 models do NOT use Window USB class compliant drivers but rather (first time for Mackie I believe) are dependent on Mackie (Loud corp) USB drivers which are downloadable from Mackie.com. Audacity is very confused in detecting the Windows Audio device passthrough which Audacity without ASIO is dependent on to get a successful Recording and Playback Audio setup.

Because I installed VS (Desktop with C++ ver) 2022 on my D: partition (I have a relatively small C: reserved primarily for Win 10 OS) I needed to adjust the path to VS in audacity-asio.cmd to point there.
I was worried as it ran as build-audacity.cmd seemed to restart the VS build routines several times and threw tons of Warnings. Warnings mostly involved components which were missing or the wrong version but eventually the script recovered after many had to be downloaded and updated (haven't checked the error list yet to try to understand all that). Total build took about 12 minutes to complete but finally got the Success! and "Where to find the audacity.exe" msg; it just in your c:\project folder which was created as recommended in the first steps.
Question...This new audacity-asio destination folder seems to have lots of .cmake files (and other files part of the build/make process creating a folder of around 491mb). Can I delete any of these or are these required to be left in place?

@Giermann
Copy link

Giermann commented Feb 6, 2023

Can I delete any of these or are these required to be left in place?

You may delete any files, that are not present in a normal Audacity installation.
In fact, you may also only replace the "portaudio_x64.dll" from an official distribution with that newly built one.

@SteveALee
Copy link
Author

SteveALee commented Feb 6, 2023

@mapper14 Congratulations and thanks for sharing. DOS/Windows use of separate drives is the source of so many problems. You were lucky. My guess is the CMake phase referenced all libs on C: when they were actually on D:. It's amazing VS dealt with it, with a double install. It might have been possible to address that, but life's too short :)

What @Giermann said re all those build artifact files. And it's great to know that only that DLL required.

BTW I wonder if you don't get much better latency than the old bridging driver which appeared to me to be a complete bodge.

@mapper14
Copy link

mapper14 commented Feb 6, 2023

Well, sorry to have to retract my enthusiasm now because with actual testing with my Mackie ProFX10V3 the s*** really hits the cooling fan! Although Audacity does run (the startup is extremely slow on my i5 laptop-almost 30 sec to get the splash screen!) the ASIO implementation in this build behaves very strangely when connected to the Mackies. Audacity Audio-Interface choices now add ASIO to the usual Windows MME, WASAPI and Direct Sound. Playback device choice now gives the usual Windows options for my laptop, Realtek HD speakers, headphones, plus ASIO. However the ASIO control panel acts very strangely; the ASIO tray icon has got to two vertical lines (not the fatal warning exclamation marks however) and flashes. ASIO control panel does open but does not display my ProFX bridged drivers correctly. On other ASIO compliant DAWs (such as Tracktion Waveform and Ableton) the ASIO panel correctly shows base ProFX plus two branches, one for the ProFX channel 1-2 and the other for ProFX channel 3-4 and either branch or both can be turned on or off. When the channel branch is ON, the DAW detects and uses that under its Interface-Device pull downs. I suspect these multichannel ASIO devices and drivers cause additional compatibility grief with this version of the audacity-asio build. Lord knows what the Allen Heath 4 channel USB mixers would show! The final (and fatal) defect shows up when Audacity-ASIO is actually connected to the ASIO-Mackie bridge and the input sound turns on for a few seconds, then turns off and keeps cycling and nothing comes through when the Record Monitor is clicked. Guess if I want to pursue this I'll have to dig into the code as to how the version of the ASIO base code is married to the audacity base. I'm pretty rusty on VS Make files so I have to rely on these cookbook scripts for now. I'd really love to hear if any Audacity geeks have any further experiences (good or bad) with the actual nuanced usages and behaviour after building and running audacity-asio. Cheers for now, Mike

@SteveALee
Copy link
Author

Sigh! So two possibilities come to mind 1) the Audacity ASIO support isn't working with your setup, or 2) the build is barfed even though it appears to work. I'll try to explore 2) in the next couple of days, but can't promise.

@SteveALee
Copy link
Author

@mapper14 I had a quick look and Visual Studio only lets you change the installation location of some components. I don't know if all required parts will be moved or not so adjusting the path in script may or may not work. I can't support this I'm afraid. If you really don't have room for VS and the build on C: I suggest your find another PC to build on.

@mapper14
Copy link

mapper14 commented Feb 7, 2023 via email

@Giermann
Copy link

Giermann commented Feb 7, 2023

As this Gist is only to help people compiling Audacity with ASIO support, I'd suggest to report the issue here.

@SteveALee
Copy link
Author

SteveALee commented Feb 7, 2023

Thanks @Giermann and +1

@mapper14 a build can in theory complete without errors but not be correct. It appears to me that VS only allows the libs etc to be in c:\Program Files... so if you edited the script to say they are in D:\ I'd say your build config is indeterminate.

Also ASIO4ALL is the "bodge" driver I had in mind in my previous comment. AfAIK it makes windows drivers look like ASIO but without any of the multichannel or speed advantages. I suggest if you see it being used you have a run time config issue which you can best take to the Audacity team for support Best of luck.

@mapper14
Copy link

mapper14 commented Feb 7, 2023 via email

@rvyhmeister
Copy link

I just tried this on a clean Windows 11 VM... Installed VS, python and git (and checkpointed the VM)... then ran the script... and here it dies... f:\audacity is set as PROJROOT.

Any help is appreciated!

Building Audacity 3.2.3 64 bit release with ASIO support...

-- Conan: checking conan executable
-- Conan: Found program CONAN_CMD-NOTFOUND
CMake Error at cmake-proxies/cmake-modules/conan.cmake:813 (message):
Conan --version failed='The system cannot find the file specified'
Call Stack (most recent call first):
cmake-proxies/cmake-modules/AudacityDependencies.cmake:18 (conan_check)
CMakeLists.txt:237 (include)

-- Configuring incomplete, errors occurred!
See also "F:/audacity/audacity-asio/CMakeFiles/CMakeOutput.log".
Error: Cannot create Audacity buildfiles

f:\audacity>

@rvyhmeister
Copy link

rvyhmeister commented Feb 17, 2023

Found the problem... conan existed and could be found, but not in the same path as python.exe... so I copied it from where it was to the scripts directory for the python that is in \program files\ directory... problem solved...

Now, how can I tell if I have ASIO properly installed? I don't see it anywhere, and my dev machine and the machine attached to the mixer are not the same... I don't want to go and expect it to work, and then there is something else... Thanks!

@Giermann
Copy link

Just open the Audio host submenu somewhere (in toolbar or Audio settings) and you should find "ASIO" there:
grafik

@victorwestmann
Copy link

I was just thinking... the first comment on this issue was on 2020. Almost 3 years ago. Isn't this something we couldn't try to merge with the main project now that it switched hands and they are revamping and improving Audacity considerable in such a short time span? What do you think? Is this doable? Is this possible?

@SteveALee
Copy link
Author

@rvyhmeister the fact its F: not C: as most common and tested indicates there might path issues.

@SteveALee
Copy link
Author

Oops, missed other comments

@Giermann thanks

@victorwestmann works form me. I'm sure even devs would appreciate easy build, at least for first build. And also those wanting to provide a drive by pull request. CC @Tantacrul

@rvyhmeister
Copy link

Hmm... I don't show the ASIO as shown by @Giermann. As I re-read the instructions it says that I must have ASIO drivers installed. I do have them installed, but they're not active, since I'm not connected to the ASIO mixer... So how do I get the ASIO drivers into Audacity? Or will ASIO show up magically when I run audacity on the machine connected to the mixer?

@SteveALee
Copy link
Author

@rvyhmeister try when connected to the active hardware. Otherwise, please ask over in the Audacity community as this Gist is about building only.

@MarkMayhew
Copy link

I had to "pip uninstall conan" and" pip install conan==1.59.0" for the script to work. Apparently conan 2.0 was just released and the commands are different. Reference: audacity/audacity#4360

@SteveALee
Copy link
Author

@MarkMayhew oh brilliant!! What happened to backward compatability!? Thanks for the heads up.

@rvyhmeister
Copy link

@rvyhmeister try when connected to the active hardware. Otherwise, please ask over in the Audacity community as this Gist is about building only.

When connected to active hardware, ASIO showed up and worked! Thanks to all!

@SteveALee
Copy link
Author

@rvyhmeister that's excellent news. Thanks for sharing.

@SteveALee
Copy link
Author

@MarkMayhew I updated the script. Thanks again.

@steadybright
Copy link

steadybright commented Apr 22, 2023

I got it to work as well, but it doesn't function as I expected, I've got a live instrument feed through a Focusrite Scarlett Solo. I am able to select the Scarlett Solo as the ASIO input and output in Audacity now, and it records the instrument through the Scarlett Solo just fine, but I cannot figure out how to configure Audacity to let me hear the instrument (other than playback of what was recorded). So, I can play the recording and hear the instrument in the recording, but I cannot hear the instrument "live." Has anyone else been successful making this work that may be able to help me? Thank you!

@SteveALee
Copy link
Author

SteveALee commented Apr 22, 2023

@steadybright Best ask the Audacity community as this gist is just about building with ASIO enabled.

That said it sounds like you need something else to play sounds coming in from your device when Audacity is not doing anything. Windows itself probably doesn't see the ASIO drivers at all. Have a look in control panel sound settings.

I'd expect audacity to let you hear when it's recording, so maybe select record and pause?

@SteveALee
Copy link
Author

Updated to Audacity 3.3.2

@SteveALee
Copy link
Author

SteveALee commented Jun 4, 2023

Fixed a bug stopping conan being installed as python was not on the path until you open a new cmd window

@Sky3RN
Copy link

Sky3RN commented Jun 20, 2023

It doesn't work with me..

I get stuck on the splash screen. I think portaudio_x64.dll is the issue. I tried swapping the portaudio dll with the original one and Audacity started but with no ASIO, I also copied the new compiled to the original Audacity and it didn't start (splash screen only). So yeah this file is causing trouble but I don't know why and how to solve it.

I spent hours and hours trying to compile and compile it again. Still stuck on the splash screen. Grrr.
Sometimes I get the popup asking for the ASIO I wand to use and splash screen again.

This is why I'm trying to compile Audacity with ASIO : audacity/audacity#4784

@SteveALee
Copy link
Author

@Sky3RN sorry to hear it does not work. Sadly I cannot offer any advice or support other than on this script that build Audacity. Just some random un tested thoughts.

  • I assume you have 64 bit Windows? Hard to image not these days :-P
  • Maybe something to do with French Language Windows? I know you need the English language pack to keep Visual Studio happy.
  • May be there is an Audacity log where startup errors are recorded? Did you explore the Windows error log?
  • You indicate a specific ASIO driver is causing problems so can you try another? Perhaps for other hardware? I don't know if the ASIO4ALL hack is compatible with Audacity.

Good luck.

@Sky3RN
Copy link

Sky3RN commented Jun 21, 2023

  • I assume you have 64 bit Windows? Hard to image not these days :-P

Sorry I didn't mention it. Yes, it's Win 10 64 bits.

  • Maybe something to do with French Language Windows? I know you need the English language pack to keep Visual Studio happy.

I've tried with French language, both French and English language, and also English language only. Same thing everytime.

  • May be there is an Audacity log where startup errors are recorded? Did you explore the Windows error log?

Yup, it might be, but I don't know where to find it. 😁 It's easier on Linux.. I'm not really familiar with Windows.

  • You indicate a specific ASIO driver is causing problems so can you try another? Perhaps for other hardware? I don't know if the ASIO4ALL hack is compatible with Audacity.

I tried with 2 different ASIO, one for my PreSonus StudioLive 16.0.2 and one for my Zoom UAC-232 (which is why I'm trying to compile Audacity). I never use the sh*tty ASIO4All. :)

@SteveALee
Copy link
Author

@Sky3RN

It's easier on Linux.. I'm not really familiar with Windows.

Any reason not to stick with Linux? It's been a decent desktop experience for a long time now. Is it availability of other software? Out of Interest which distro?

I tried with 2 different ASIO,

So it fails with two different manufacturer's drivers? Might be safe to assume doesn't work with any ASIO drivers? Hmm. I only have a McMillen ASIO driver. Will try to test a new build with it over next few days to ensure something did't go wrong when I bumped the Audacity build version.

never use the sh*tty ASIO4All.

Good plan. AFAIK it's only for use with ASIO only apps when you have no ASIO drivers. Trouble is many manufacturers got lazy and suggest you use it rather than supplying ASIO drivers. Not multi channel and not latency gains. Sigh. As you say "sh*tty " :)

@Sky3RN
Copy link

Sky3RN commented Jun 21, 2023

@SteveALee

It's easier on Linux.. I'm not really familiar with Windows.

Any reason not to stick with Linux? It's been a decent desktop experience for a long time now. Is it availability of other software? Out of Interest which distro?

The reason is more complicated than that !
I use Linux everyday for my "everyday tasks" as I could say. I use Windows only for two things : Recording / Mixing, and video editing.
I never use Audacity, I'm not a big fan of this software. But the reason why I'm trying to get this thing fixed is : As a sound engineer and YouTuber talking about sound, a lot of my audience are noobs using Audacity and nothing else. I recently did a video testing the new Zoom UAC-232 which is capable to record in 32 bits float, and I noticed it doesn't work on Audacity. In fact, it works fine with Audacity on Linux, but not with Audacity on Windows. By "doesn't work" I mean it's recognized but doesn't record in 32 bits float in Audacity for Windows 10.
That's why I'm trying to know why. And all of my researches led me to this point : Maybe it could come from this ASIO not supported natively on Audacity.

I tried with 2 different ASIO,

So it fails with two different manufacturer's drivers? Might be safe to assume doesn't work with any ASIO drivers? Hmm. I only have a McMillen ASIO driver. Will try to test a new build with it over next few days to ensure something did't go wrong when I bumped the Audacity build version.

Exactly, failed with the PreSonus driver and the Zoom driver. I've seen your script installs Audacity 3.3.2 and now the official release is 3.3.3, maybe it could be the cause ? I don't know. I'm not an expert in dev !

never use the sh*tty ASIO4All.

Good plan. AFAIK it's only for use with ASIO only apps when you have no ASIO drivers. Trouble is many manufacturers got lazy and suggest you use it rather than supplying ASIO drivers. Not multi channel and not latency gains. Sigh. As you say "sh*tty " :)

😁😁😁

@SteveALee
Copy link
Author

@Sky3RN So I'm a little confused now. Are you using both drivers with the same 32 bit capable Zoom hardware and get the same failure - hang during splash screen? Or different hardware for each driver and same failure? Or something else?

For your info I've found Audacity only adds the ASIO support UI when the hardware is connected using the ASIO driver. Might be relevant?

I'll look up your tube channel :)

I'll bump the version but I think you have same problem with both 3.3.2 with this script and 3.3,3 with Audacity project build?

@AdamWardUK
Copy link

@Sky3RN
Can't advise on this (not my area at all), but it occurred to me that testing https://www.wavosaur.com/ might help scope where the problem is - it supports ASIO without (being closed source) portaudio, so can perhaps help identify the issue as with portaudio itself or the underlying Windows support? And it might have some useful logging.

@Sky3RN
Copy link

Sky3RN commented Jun 21, 2023

@SteveALee

@Sky3RN So I'm a little confused now. Are you using both drivers with the same 32 bit capable Zoom hardware and get the same failure - hang during splash screen? Or different hardware for each driver and same failure? Or something else?

In fact, I have 3 soundcards plugged, all used "at the same time", I'm simply switching from one to another when needed, for multiple usages. So the failing is here with whatever soundcard and ASIO driver I use.

For your info I've found Audacity only adds the ASIO support UI when the hardware is connected using the ASIO driver. Might be relevant?

I've tried to compile with 2 of 3 soundcards disconnected, keeping connecting only the Zoom UAC-232 and.. Same issue !

I'll look up your tube channel :)

I don't know if you'll understand, it's all in French. :p

I'll bump the version but I think you have same problem with both 3.3.2 with this script and 3.3,3 with Audacity project build?

I'm trying right now to try with 3.3.3 (modified the "3.3.2" into "3.3.3" in the script) but keeps on failing.. Even with only 1 soundcard connected.

@AdamWardUK

Can't advise on this (not my area at all), but it occurred to me that testing https://www.wavosaur.com/ might help scope where the problem is - it supports ASIO without (being closed source) portaudio, so can perhaps help identify the issue as with portaudio itself or the underlying Windows support? And it might have some useful logging.

I'll have a look but I don't know how to proceed and I don't have enough time these days ! :/

@SteveALee
Copy link
Author

I bumped the Audacity version to 3.3.3 - https://github.com/audacity/audacity/releases/tag/Audacity-3.3.3

@SteveALee
Copy link
Author

@Sky3RN Compiling is independent of any sound hardware. The issue is how Audacity reacts when it runs. Perhaps having all hardware connected at once is confusing audacity. But you say even with just one. Or all the drivers?

I will double check it works with my ASIO hardware and let you know.

No I don;t speak French - looks good though. My wife is learning :)

@SteveALee
Copy link
Author

@Sky3RN did you try an ASIO DAW or some such to confirm the problem is with Audacity?

@SteveALee
Copy link
Author

@AdamWardUK oh, I see you suggested that too - thanks

@Sky3RN
Copy link

Sky3RN commented Jun 21, 2023

@SteveALee

I bumped the Audacity version to 3.3.3 - https://github.com/audacity/audacity/releases/tag/Audacity-3.3.3

Maybe I'm not sure what does "bumped" mean, but it looks like a real Audacity without ASIO.
As I told you before Audacity works fine, it's the version compiled with ASIO who doesn't work. So yeah, the 3.3.3 works, but 3.3.3 with ASIO doesn't work. Same for the 3.3.2.
I don't know if you see what I mean ?

Perhaps having all hardware connected at once is confusing audacity. But you say even with just one. Or all the drivers?

I tried with all hardware connected at the same time, and only with one connected.
Something's blocking and I can't find what and why..

No I don;t speak French - looks good though. My wife is learning :)

👍👍

did you try an ASIO DAW or some such to confirm the problem is with Audacity?

Yep. As far as it's my job, I'm using everyday Mixcraft, sometimes ProTools or Cakewalk or Studio One. Never had any issues with them.

To resume : Audacity works fine but doesn't record in 32 bits float, that's why I'm trying to compile it with ASIO, and when it's compiled it doesn't open and get stuck on the splash screen. Sometimes it asks for the ASIO driver but still gets stuck, and most of the other times I don't have the popup for ASIO selection.
I tried to compile and recompile again and again and again, I don't know how to force this popup to be shown ! It's seem to be a random thing.

@SteveALee
Copy link
Author

@Sky3RN I'm afraid I've run out of ideas for you. I just clean built 3.3.3 and it works fine with my McMillen K-mix ASIO driver. I needed to turn on the Device toolbar to see the ASIO option. It offers all 9 channels. I just didn't try any audio. But you don't get that far. :(

So I can only think it is a Windows issue - unlikely, an Audactity bug, an ASIO driver issue, or a audacity/driver compatibility issue.

In theory compiling twice will have been enough as installed drivers have no influence on the build, only the audacity version number
If you already had visual studio or python installed they may have been issues but I expected a build failure.
Note the --cleanall option deletes all fetched and built files but not the install tools. Try that an uninstalling the tools if you really want to

I can only wish you the best of luck. Sorry.

@Sky3RN
Copy link

Sky3RN commented Jun 22, 2023

@SteveALee I understand ! Nop unfortunately !

I used to think it's a Windows issue too, but I tried on 2 different computers. One is my main desktop, the other one is my laptop and they don't have the same setup at all. But they mostly have the same ASIO drivers installed (Zoom, PreSonus, ASIO Link Pro).
I tried with and without any gear connected, same issue : Stuck on the splash screen.

I might think it could be a driver compatibility issue but.. Which one ? I'll have to uninstall all the drivers to find out the messing one ! I'll try.

I use the --cleanall option ! ;-) And I already tried to uninstall the tools and reinstall everything with your script !

Well, thank you so much for your time and your kindness. I guess the only thing to do now is looking deeply on the Internet.

@SteveALee
Copy link
Author

@Sky3RN

I might think it could be a driver compatibility issue but.. Which one ? I'll have to uninstall all the drivers to find out the messing one ! I'll try.

Sadly that is probably your sensible next step. Uninstall all and add one at a time. Don't you just love computers! I'd try only the 32 bit one first as that's a bit unusual. I assume Audacity supports 32 bit OK?

@Giermann
Copy link

@Sky3RN

And I already tried to uninstall the tools and reinstall everything with your script !

Remember: the script offered here and the post-installed tools are only to compile Audacity!!
They neither affect the runtime of an ASIO build, nor are they necessary on every target machine.

You already wrote, that you checked your built portaudio_x64.dll with an original distribution and vice versa. Another option would be to share (NO - not to publish, only to share for testing) your built DLL with another person and/or get a running version from him or her. That way you could verify if it is really a driver issue with your drivers or a fault at build time.

@SteveALee
Copy link
Author

SteveALee commented Jun 22, 2023

@Sky3RN thanks @Giermann

I assumed you had no errors in the build and audacity was launched at the end? It seems so from what you say.

if you want to check for any errors / warnings you can run the following to build and send all output the file out.txt. But again I can;t really support you on build errors

build-audacity.cmd --clean > out.txt 2>&1

@Sky3RN
Copy link

Sky3RN commented Jun 22, 2023

@SteveALee

Sadly that is probably your sensible next step. Uninstall all and add one at a time. Don't you just love computers! I'd try only the 32 bit one first as that's a bit unusual. I assume Audacity supports 32 bit OK?

I just tried ! I've uninstalled all of my ASIO drivers, recompiled Audacity and.. Still doesn't work.
Yes it normally should support 32 bits float because it's working on Linux natively, didn't have to compile with ASIO.

@Giermann

Another option would be to share (NO - not to publish, only to share for testing) your built DLL with another person and/or get a running version from him or her. That way you could verify if it is really a driver issue with your drivers or a fault at build time.

I will try that !

@SteveALee

I assumed you had no errors in the build and audacity was launched at the end? It seems so from what you say.

I guess there was no error, but everytime I get a "121 avertissements" (I guess in English it's "121 warnings").

Here's the output file : http://pastebin.fr/129044

@htdSoundTech2020
Copy link

htdSoundTech2020 commented Sep 2, 2023

@SteveALee

It's easier on Linux.. I'm not really familiar with Windows.

Any reason not to stick with Linux? It's been a decent desktop experience for a long time now. Is it availability of other software? Out of Interest which distro?

The reason is more complicated than that ! I use Linux everyday for my "everyday tasks" as I could say. I use Windows only for two things : Recording / Mixing, and video editing. I never use Audacity, I'm not a big fan of this software. But the reason why I'm trying to get this thing fixed is : As a sound engineer and YouTuber talking about sound, a lot of my audience are noobs using Audacity and nothing else. I recently did a video testing the new Zoom UAC-232 which is capable to record in 32 bits float, and I noticed it doesn't work on Audacity. In fact, it works fine with Audacity on Linux, but not with Audacity on Windows. By "doesn't work" I mean it's recognized but doesn't record in 32 bits float in Audacity for Windows 10. That's why I'm trying to know why. And all of my researches led me to this point : Maybe it could come from this ASIO not supported natively on Audacity.

I tried with 2 different ASIO,

So it fails with two different manufacturer's drivers? Might be safe to assume doesn't work with any ASIO drivers? Hmm. I only have a McMillen ASIO driver. Will try to test a new build with it over next few days to ensure something did't go wrong when I bumped the Audacity build version.

Exactly, failed with the PreSonus driver and the Zoom driver. I've seen your script installs Audacity 3.3.2 and now the official release is 3.3.3, maybe it could be the cause ? I don't know. I'm not an expert in dev !

never use the sh*tty ASIO4All.

Good plan. AFAIK it's only for use with ASIO only apps when you have no ASIO drivers. Trouble is many manufacturers got lazy and suggest you use it rather than supplying ASIO drivers. Not multi channel and not latency gains. Sigh. As you say "sh*tty " :)

😁😁😁

The drivers from zoom for their smaller devices have always set the datachunk and native sample rate the computer will be "looking" for from the device. When this doesn't match up (usually DAW software to datachunk size for speed and memory use, Native sample rate to what's on the device itself) you can get all kinds of issues, from sound not showing up to driver not showing up. Also, 32bit windows doesn't exactly have an audio capability for 32bit float natively. I know this because every audio app I've tried in the 32bit versions only goes as high as 24bit. With Linux, you didn't have this problem because linux was 64bit only for a long while before 64bits became the norm for most Windows installations. If you are stuck with a 32bit windows, you are almost always limited to 24bits, 96k, accept with one or two software titles (can't remember which). If you are compiling a 64bit version and still don't get 32bit float (I've had no experience with your device here, so grain of salt), it may be connected to the driver, though I have seen that the device can use 24bit and the system 32 without problems in Adobe Audition. My experience with zoom devices has been that there is a driver interface that you can access to set the sample rate and the data chunk, but the device must be set to the right mode or you will not get audio; or you will get a message in your DAW that it isn't working. My H6 has 2 drivers installed. One is a simpler L\R stereo driver, another is the multitrack driver. If I set the device to Stereo for the connection and the PC for Multitrack, no go. If I set the data chunk wrong, the sound fragments. The sample rate can be higher than the project file, but lower and it'll stutter and possibly flag errors, showing you a thousand popup messages for all the samples you drop.
And the ASIO4ALL driver is not actually an ASIO driver, but an attempt at a clone of it. While I have always had access to the 32bit driver in 32bit Audacity, I haven't tried 64bits.
Here are the possibilities I can see:

  1. The DLL you are using is corrupted, replace it with a clean download.
  2. The DLL may be flagged as a "Dangerous" file by an AV like Windows Defender, fix that by allowing the file.
  3. The script is downloading new versions that mismatch (unlikely, but possible)
  4. If the DLL is the result of a Build operation, the build is done but one of the binaries or project files is missing or corrupted.
  5. You need to set your path variables on your own, since you may have UAC issues with that (a nasty little gift from Windows 7 that is helpful on occasion).

@SteveALee
Copy link
Author

@htdSoundTech2020 Thank you for your insights! It's a little hard to parse the one big paragraph but some thoughts.

  • This gist only automates the Audacity project build so any technical issues using Audacity need to be raised with the project team,
  • While the 32 Bit float audio resolution is not directly related to platform bit size, it makes sense 64 bits is required. To be honest older 32 bit platforms are likely to hit all sorts of support issues.
  • Yes ASIO4ALL is not ASIO - but this point confuses many due to the inaccurate name ASIO-fake or fauxASIO would be better. It makes normal windows sound appear to be the ASIO interface that Apps that require ASIO drivers demand. You don't get any of the ASIO benefits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment