Audacity, ASIO & misbehaving 'Realtek ASIO' driver

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
John Fishbeck
Posts: 17
Joined: Fri Feb 15, 2019 3:35 pm
Operating System: Windows 10

Audacity, ASIO & misbehaving 'Realtek ASIO' driver

Post by John Fishbeck » Fri Feb 15, 2019 4:28 pm

Hi all,

I'm wanting to build a version of Audacity on WIndows 10 to use the ASIO devices interface. I followed the instructions in the win\build.txt document in the Audacity distribution from git. Compiled the wxWidgets DLL, downloaded the ASIO SDK, set (and verified) the ASIOSDK_DIR and WXWIN environment variables. Compilation succeeded.

However, after moving the compiled Audacity.exe executable into the C:\Program Files (x86)\Audacity installation folder and launching it I am immediately greeted with a dialog box containing the following text:

Code: Select all

Mismatch between the program and library build versions detected.
The library used 3.1.1 (wchar_t,Visual C++ 1900,wx containers),
and your program used 3.1.1 (wchar_t,Visual C++ 1900,wx containers,compatible with 3.0).
This is more than a bit cryptic to my inexperienced eyes. Furthermore, I'm confused as to why there would be a mismatch, since the error dialog states a mismatch between library "library used 3.1.1 (wchar_t,Visual C++ 1900,wx containers)" and the program " program used 3.1.1 (wchar_t,Visual C++ 1900,wx containers,compatible with 3.0)" - versions identified in the message text look the same to me. What am I missing here?

Any assistance with this will be appreciated.

Running Windows 10 Pro, version 1809, 64 bit. Compiling with MS Visual Studio 2017, version 15.4.2 .

Doing a properties query on the original downloaded distribution executable shows Audacity version 2.3.0.0; compiled version from the cloned git distribution shows version 2.3.1.0. Doesn't seem like this would be an issue, but maybe it is?

Thanks,
John Fishbeck
Last edited by John Fishbeck on Wed Feb 20, 2019 8:45 pm, edited 1 time in total.

cmjone
Posts: 96
Joined: Fri Jul 06, 2012 12:00 am
Operating System: Windows 10

Re: Mismatch between the program and library build versions

Post by cmjone » Fri Feb 15, 2019 5:56 pm

Hello:
After you successfully compiled Audactiy, were you able to launch it from the Release folder? If you could and you could not after re-location, it probably points to some missing files. You cannot just re-locate the executable and expect it to work.

John Fishbeck
Posts: 17
Joined: Fri Feb 15, 2019 3:35 pm
Operating System: Windows 10

Re: Mismatch between the program and library build versions

Post by John Fishbeck » Fri Feb 15, 2019 7:44 pm

Okay, sure - that makes sense. And now I see that the \Audacity\win\Release directory contains a full install build and configuration - I didn't realize that the compilation process would do that.

So I have an existing Audacity 3.2.0.0 installation from the downloaded Windows installer, in which I have some settings and references to locations of saved projects which I'd like not to lose. How do I migrate my compiled Audacity with ASIO support to my currently installed Audacity installation. Do I just copy over all of the binaries from the \Audacity\win\Release directory into my existing C:\Program Files (x86)\Audacity installation folder?

I do see that my local user context settings are preserved in C:\Users\myusername\AppData\Roaming\audacity . So do I just replace the entire C:\Program Files (x86)\Audacity installation directory with the entire contents of the \Audacity\win\Release directory?

Do I need to accomplish something to 'complete' the installation of my compiled application?

Sorry to be a PITA on this. My developer days go a LONG way back to a much simpler world.

Regards,
John

John Fishbeck
Posts: 17
Joined: Fri Feb 15, 2019 3:35 pm
Operating System: Windows 10

Re: Mismatch between the program and library build versions

Post by John Fishbeck » Fri Feb 15, 2019 9:17 pm

Okay, I started out from scratch by deleting the entire contents of my wxWidgets and Audacity directories, and then used git to fetch fresh copies of the wxWidgets and Audacity repositories. I then successfully compiled (again, using MS VS 2017 version15.4.2 both wxWidgets (for release DLL) and Audacity (for release) (while the compilations succeeded without errors, there were numerous (hundreds) of warnings - is this normal?).

After the successful compilations I went to the \audacity\win\Release directory and launched Audacity.exe. The first time it launched correctly - and I saw ASIO offered as an audio host, confirming compilation with the ASIO support included. However, all subsequent attempts to launch the same executable from the same location immediately results in the error dialog box shown here:

AudacityErrDialogBox.jpg
AudacityErrDialogBox.jpg (19.04 KiB) Viewed 1543 times

Any clue as to what's amok here? Or how I go about trying to determine the source of the problem?

Thanks,
John

cmjone
Posts: 96
Joined: Fri Jul 06, 2012 12:00 am
Operating System: Windows 10

Re: Mismatch between the program and library build versions

Post by cmjone » Sat Feb 16, 2019 1:39 am

I do not think you can migrate your compiled version 3.2.1 the way you want to migrate. Remember, you installed you 3.2.0.0 to your current location by using the installer. However, you do not have an installer for 3.2.1. Before going further, you need to find out whether you can launch the compiled version first. If you cannot, there are more things you have to do.

John Fishbeck
Posts: 17
Joined: Fri Feb 15, 2019 3:35 pm
Operating System: Windows 10

Re: Mismatch between the program and library build versions

Post by John Fishbeck » Sat Feb 16, 2019 1:54 am

I'm sorry, I must not have written very clearly in my prior post.

I am now launching the freshly compiled version of Audacity.exe residing in the \audacity\win\Release directory . Execution immediately fails with the dialog box shown in prior post, text of which is "Unhandled unknown exception; terminating the application". This is after doing a complete re-download from git of wxWidgets and Audacity, followed by a complete rebuild on wxWidgets and a subsequent complete rebuild of Audacity (both compiled using MS Visual Studio 2017). WXWIN and ASIOSDK_DIR environment variables are defined, present and correct. System was rebooted following the compilations.

I'm stuck in the water here. There is no information presented that I can find regarding the source of the problem, including perusing the application and system event logs.

How do I go about determining the source of this problem?

John Fishbeck
Posts: 17
Joined: Fri Feb 15, 2019 3:35 pm
Operating System: Windows 10

Re: Mismatch between the program and library build versions

Post by John Fishbeck » Sat Feb 16, 2019 2:26 pm

Okay, I have discovered the source of my problem, if not the underlying root cause of it. If I compile the 3.2.1.0 version of Audacity retrieved via git with the ASIOSDK_DIR environment variable defined (and correctly referencing the location of the downloaded ASIO SDK 2.3.2), the compiled Audacity.exe fails immediately when launched with the error dialog box shown above ("Unhandled unknown exception; terminating the application").

However, if I compile the same Audacity source without the ASIOSDK_DIR environment variable defined the resulting executable runs fine without any issues.

Clearly there's some issue with the inclusion of the ASIO SDK components in the build. The Audacity.exe compiled with ASIOSDK_DIR defined is 13,456,896 bytes, while the version compiled without ASIOSDK_DIR defined is 13,435,392 bytes. The ASIO version executable is 21,504 bytes larger than the non-ASIO version, so there's obviously code added (presumably the ASIO support) to the ASIO version.

Help->About in the compiled 3.2.1.0 version shows version info as 'Audacity 2.3.1-alpha-Feb 16 2019' - might the fact that this is an alpha version of the next release be the source of the problem?

Is a current stable release version (3.2.0.0) of the Audacity source code available to try? I'm not seeing that as an option when I visit the Audacity git page.

Thanks,
John

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

Re: Mismatch between the program and library build versions

Post by steve » Sat Feb 16, 2019 3:35 pm

If you cloned Audacity from the GitHub repository, you can checkout a previous release using the "tags" switch. For example:

Code: Select all

git checkout tags/Audacity-2.3.0
If you just want to download the sourcecode as a ZIP archive, you can do that from the "Releases" section of GitHub. (Download link near the bottom of: https://github.com/audacity/audacity/re ... city-2.3.0)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Mismatch between the program and library build versions

Post by steve » Sat Feb 16, 2019 3:37 pm

John Fishbeck wrote:
Sat Feb 16, 2019 2:26 pm
Clearly there's some issue with the inclusion of the ASIO SDK components in the build. T
Do you have a working ASIO setup? (A sound card with ASIO drivers, successfully tested in another ASIO app)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

John Fishbeck
Posts: 17
Joined: Fri Feb 15, 2019 3:35 pm
Operating System: Windows 10

Re: Mismatch between the program and library build versions

Post by John Fishbeck » Sat Feb 16, 2019 4:41 pm

Hi again Steve,

First, thanks for working this with me.

I figured out the tags thing for git shortly before you posted your message re: git, versions and tags. Subsequently retrieved Audacity source for 3.2.0.0 and compiled same. Same results - 3.2.0.0 version compiled without ASIO launches and runs without issue; 3.2.0.0 version compiled with ASIO support fails immediately upon launching with the "Unhandled unknown exception; terminating the application" error dialog.
Do you have a working ASIO setup? (A sound card with ASIO drivers, successfully tested in another ASIO app)
I do not. I have a Behringer UMC202HD audio interface on order, and I was trying to prepare an ASIO-capable version of Audacity to use in anticipation of its arrival.

As an experiment I downloaded and installed Behringer's driver, rebooted, then launched the Audacity version with ASIO support - same result; immediate failure upon launching. FWIW, I never see the user interface - the executable never makes it that far. Using the SysInternals ProcMon tool I can see Windows Explorer going through the steps to load Audacity and its associated components, but the Audacity executable never runs - so it appears that this is some sort of load time issue.

Do I understand from your question above that the ASIO version of Audacity will not launch (and in fact will fail catastrophically) unless an ASIO device is connected to the system at application launch time? I won't always be using Audacity with the audio interface, so if true, this is a bit inconvenient.

Post Reply