ASIO support in Audacity 2.4.2

Building and customizing Audacity from the source code.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
micsthepick
Posts: 18
Joined: Fri Dec 21, 2018 1:41 am
Operating System: Windows 10

Re: ASIO support in Audacity 2.4.2

Post by micsthepick » Fri Jul 24, 2020 12:32 pm

@doubleO7 no worries, I’m thinking that a couple of projects later in the dependency chain were left intentionally broken in the windows build, as two were failing when I built it too

Apesbrain
Posts: 95
Joined: Sat Dec 04, 2010 4:58 pm
Operating System: Windows 10

Re: ASIO support in Audacity 2.4.2

Post by Apesbrain » Sat Nov 28, 2020 5:28 pm

micsthepick wrote:
Fri Jul 24, 2020 4:12 am
doubleO7 wrote:
Thu Jul 23, 2020 10:13 pm
Maybe someone can tell me how exactly I can insert this patch into the source code.
sure, use this tool: https://git-scm.com/docs/git-apply
it comes with git, so assuming that you managed to clone audacity/wxwidgets with the correct 3.1.3-audacity-fixes branch, then all you need to do is open a terminal in the audacity repo and run

Code: Select all

git apply asio.patch
sent from my phone
Not sure what I was doing wrong earlier, but with this instruction I got ASIO to build on 2.4.2. Thanks.

jademan
Forum Crew
Posts: 1357
Joined: Fri Jul 17, 2009 10:11 pm
Operating System: Windows 10

Re: ASIO support in Audacity 2.4.2

Post by jademan » Sun Nov 29, 2020 2:36 am

OK, I (finally!) got Audacity 2.4.2 with ASIO to compile on Windows 10. :D

I would like to share with you my steps, so that you may/might be able to duplicate them. My thanks to steve, Apesbrain and micsthepick whose posts gave me the solution I only had to duplicate and document; and to Steve A Lee for the 2.4.1 version of this cmd file.

1) I have previously download Visual Studio Community Edition 2017. See https://visualstudio.microsoft.com/vs/older-downloads/
Added 2/6/21: be sure to include the Desktop Development in C++ Workload Package.
2) I have previously downloaded and intstalled git; if you haven't done this do this now. See https://git-scm.com/download/win
3) Download and install win32 installer for cmake-3.19.1 from https://cmake.org/download/
4) Download current python 3.9 from https://www.python.org/downloads/windows/
5) Create c:\proj242 directory
6) Download latest ASIO SDK from https://www.steinberg.net/en/company/developers.html
then unzip the ASIO SDK folder and move the folder to c:\proj242.
7) Rename this folder to "ASIOSDK"
8) copy the following code build-audacity.txt to c:\proj242\build-audacity.cmd [Note .cmd extension!]
This will download the source code for audacity widgets, audacity 2.4.2, then compile, cmake, and build everything.
build-audacity.txt
rename to build-audacity.cmd
(2.68 KiB) Downloaded 149 times
9) copy the next segment of code and save it to c:\proj242\asio2.patch
asio2.patch
this is the updated asio patch file
(2.4 KiB) Downloaded 138 times
10) There should be two files and one folder in c:\proj242:
build-audacity.cmd
asio2.patch
ASIOSDK
11) Press Windows-R and type "cmd"
12) type "cd c:\proj242", then type "build-audacity"
13) The compiled progam will be built to C:\proj242\audacity\win\bin\Release\Audacity.exe
Last edited by jademan on Sun Feb 07, 2021 1:17 am, edited 2 times in total.

roadsterUK
Posts: 187
Joined: Sat Apr 15, 2017 8:00 pm
Operating System: Windows 10

Re: ASIO support in Audacity 2.4.2

Post by roadsterUK » Fri Dec 11, 2020 9:11 am

jademan wrote:
Sun Nov 29, 2020 2:36 am
OK, I (finally!) got Audacity 2.4.2 with ASIO to compile on Windows 10. :D

I would like to share with you my steps, so that you may/might be able to duplicate them. My thanks to steve, Apesbrain and micsthepick whose posts gave me the solution I only had to duplicate and document; and to Steve A Lee for the 2.4.1 version of this cmd file.
Thank you for putting in this effort and documenting it so thoroughly. To me the fact that you have needed to do this illustrates where the entire process has gone wrong so I'll be sticking with 2.4.1 and falling back on Studio One as my recording software if necessary.

steve
Site Admin
Posts: 81443
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: ASIO support in Audacity 2.4.2

Post by steve » Fri Dec 11, 2020 10:05 am

roadsterUK wrote:
Fri Dec 11, 2020 9:11 am
To me the fact that you have needed to do this illustrates where the entire process has gone wrong
I'm not sure what that means, but the reason why this is necessary is because:
Building with ASIO support requires using the ASIO SDK source code, but the ASIO SDK license prohibits distribution of the source code. Audacity's open source license requires that the full source code is freely available, so it is impossible to distribute an ASIO version of Audacity without violating one or other license.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

micsthepick
Posts: 18
Joined: Fri Dec 21, 2018 1:41 am
Operating System: Windows 10

Re: ASIO support in Audacity 2.4.2

Post by micsthepick » Mon Jan 04, 2021 9:25 am

steve wrote:
Fri Dec 11, 2020 10:05 am
I'm not sure what that means, but the reason why this is necessary is because:
Building with ASIO support requires using the ASIO SDK source code, but the ASIO SDK license prohibits distribution of the source code.
would it be possible to have an automated build (such as GH actions) with no artifacts that verifies that the ASIO build succeeds?

stevelee
Posts: 4
Joined: Fri Mar 27, 2020 6:59 pm
Operating System: Windows 10

Re: ASIO support in Audacity 2.4.2

Post by stevelee » Mon Jan 04, 2021 10:27 am

> would it be possible to have an automated build (such as GH actions) with no artifacts that verifies that the ASIO build succeeds?
Top

That's a very good suggestion plus a runtime smoke test too. It's a real shame to break existing functionality on a release, especially a patch release.

However most cloud-located CI/CD systems like GitHub actions are Linux based :(
I can only think of [Azure DevOps](https://azure.microsoft.com/en-gb/services/devops/) offering Windows VM/Containers. I've used it when it was relatively new ) and it was impress if aimed at large corps. II believe now integrates with GitHub. There's a free tier and perhaps OSS pricing. I could explore it's used if there is sufficient interest.

Anyway you're welcome to use [my script](https://gist.github.com/SteveALee/da24c ... dd98eb5d0b) if it helps. It's MIT licensed and could easily be adapted to build using any specified release.

steve
Site Admin
Posts: 81443
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: ASIO support in Audacity 2.4.2

Post by steve » Mon Jan 04, 2021 10:55 am

micsthepick wrote:
Mon Jan 04, 2021 9:25 am
would it be possible to have an automated build (such as GH actions) with no artifacts that verifies that the ASIO build succeeds?
As far as I'm aware, the ASIO SDK cannot be included in the source code (that would probably constitute "distribution" and so violate Steinberg's license), so it would need to be downloaded from Steinberg at build time. I don't know if Steinberg allow downloading to bypass their license acceptance page, or any form of automated downloading of their SDK. Even if they do allow that now, they have every right to block such downloads at any time without notice.

stevelee wrote:
Mon Jan 04, 2021 10:27 am
Anyway you're welcome to use [my script]
The current /win/build.txt seems to say that MSVC is only used for building WxWidgets. On Linux, WxWidgets may be built with cmake. Can WxWidgets be built with cmake on Windows? If so, it may be possible to make it easier to use the script by removing the requirement for "Visual Studio Community 2017". Perhaps worth looking at?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

wreck_of_u
Posts: 3
Joined: Fri Feb 05, 2021 5:38 pm
Operating System: Windows 10

Re: ASIO support in Audacity 2.4.2

Post by wreck_of_u » Fri Feb 05, 2021 5:44 pm

jademan wrote:
Sun Nov 29, 2020 2:36 am
OK, I (finally!) got Audacity 2.4.2 with ASIO to compile on Windows 10. :D

I would like to share with you my steps, so that you may/might be able to duplicate them. My thanks to steve, Apesbrain and micsthepick whose posts gave me the solution I only had to duplicate and document; and to Steve A Lee for the 2.4.1 version of this cmd file.

1) I have previously download Visual Studio Community Edition 2017. See https://visualstudio.microsoft.com/vs/older-downloads/
2) I have previously downloaded and intstalled git; if you haven't done this do this now. See https://git-scm.com/download/win
3) Download and install win32 installer for cmake-3.19.1 from https://cmake.org/download/
4) Download current python 3.9 from https://www.python.org/downloads/windows/
5) Create c:\proj242 directory
6) Download latest ASIO SDK from https://www.steinberg.net/en/company/developers.html
then unzip the ASIO SDK folder and move the folder to c:\proj242.
7) Rename this folder to "ASIOSDK"
8) copy the following code build-audacity.txt to c:\proj242\build-audacity.cmd [Note .cmd extension!]
This will download the source code for audacity widgets, audacity 2.4.2, then compile, cmake, and build everything.
build-audacity.txt
9) copy the next segment of code and save it to c:\proj242\asio2.patch
asio2.patch
10) There should be two files and one folder in c:\proj242:
build-audacity.cmd
asio2.patch
ASIOSDK
11) Press Windows-R and type "cmd"
12) type "cd c:\proj242", then type "build-audacity"
13) The compiled progam will be built to C:\proj242\audacity\win\bin\Release\Audacity.exe
This is awesome and very step-by-step. Thank you.

I followed it step-by-step, however, I'm having a problem somewhere:
'nmake' is not recognized as an internal or external command,
operable program or batch file.
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:81 (project):
The CMAKE_C_COMPILER:

cl

is not a full path and was not found in the PATH.

To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:81 (project):
The CMAKE_CXX_COMPILER:

cl

is not a full path and was not found in the PATH.

To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

jademan
Forum Crew
Posts: 1357
Joined: Fri Jul 17, 2009 10:11 pm
Operating System: Windows 10

Re: ASIO support in Audacity 2.4.2

Post by jademan » Sat Feb 06, 2021 3:22 am

Thanks for reporting this difficulty. I will try to look into this tomorrow. :?

Post Reply