Skip to content

Commit

Permalink
New post: Getting WineASIO to work
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholastay committed Jan 6, 2024
1 parent 347bca8 commit 1857518
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 2 deletions.
66 changes: 66 additions & 0 deletions content/post/2024-01-06-wineasio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "Getting WineASIO to work (at least on Fedora 39)"
date: 2024-01-06T23:16:08+11:00
tags:
- linux
- wine
---

## Background

Recently I formatted my home computer and made the jump to Linux -- specifically, the lazy way and just using Fedora Workstation 39 KDE Spin. It's been surprisingly pretty good so far!

However, I wanted to try running a Windows game via WINE which had ASIO support to get its HD audio working. After some mucking about, I got WineASIO working and thought I'd share the details on how.

## Making it work

*Note*: I only needed it working for **64-bit** so that's all I bothered with. It also assumes you are wanting to use **Pipewire JACK** (although, build steps could probably be adapted to regular JACK too).

### Building WineASIO

In case it works (and/or saves me time in future!), I've uploaded a build of v1.2.0 here: https://users.windblume.net/~nick/upload/wineasio64-1.2.0-build.tar.gz

1. Grab a copy of WineASIO's source code (at time of writing it was v1.2.0): https://github.com/wineasio/wineasio/releases
1. Install build dependencies (assuming you already have base 'Development Tools' group): `sudo dnf install pipewire-jack-audio-connection-kit-devel wine-devel`
1. Unpack it, then simply use `make 64` to run the build, outputs into `build64`. Out should come a `wineasio64.dll` and `wineasio64.dll.so`
- (A reference I saw seemed to suggest a modified Makefile was needed, but this seemed to no longer be the case)

### Installing WineASIO

In my case, I was using **Bottles** (Flatpak) to manage my WINE prefix, so this was the part that needed to cater for it. For the purposes of these steps, I will highlight the Bottles locations. -- Otherwise, the default WINE prefix lives in `~/.wine`, and the default WINE libraries live in `/usr/lib64/wine`.

(`wineasio-register` could work, but to make sure the final registering works in Bottles I think it's better to just do it manually.)

1. Ensure the Pipewire JACK connection kit is installed: `sudo dnf install pipewire-jack-audio-connection-kit`
1. Copy built WineASIO libraries into WINE libraries folder:
- `cp wineasio64.dll.so ~/.var/app/com.usebottles.bottles/data/bottles/runners/wine-ge-proton8-25/lib64/wine/x86_64-unix`
- `cp wineasio64.dll ~/.var/app/com.usebottles.bottles/data/bottles/runners/wine-ge-proton8-25/lib64/wine/x86_64-windows`
1. Copy built WineASIO DLL into relevant prefix folder (or, the game EXE folder should work too):
- `cp wineasio64.dll ~/.var/app/com.usebottles.bottles/data/bottles/bottles/<BOTTLE NAME>/drive_c/windows/system32`
1. Register WineASIO DLL with the WINE system:
- In Bottles, fire up the Command Prompt for the relevant prefix
- `cd C:\WINDOWS\SYSTEM32`
- `regsvr32 wineasio64.dll`
1. For Bottles Flatpak, you'll also need to allow access to the Pipewire device:
- `flatpak override --user --filesystem=xdg-run/pipewire-0 com.usebottles.bottles`
- Restart Bottles for good measure

### Testing it

At this stage you may be able to just fire up whatever it is you're trying to do. However, in my case, it was very unhelpful because at first it didn't work right away, and the game decided to hang on startup.

1. Grab a copy of VB-Audio's ASIO Driver Tester: https://forum.vb-audio.com/viewtopic.php?t=1204
1. Unpack it, then launch VBASIOTest64.exe
1. Click 'ASIO Device' -> 'WineASIO'
- (At this stage, WineASIO should come up. Otherwise, review the installation steps above.)
1. Graphs and numbers should start coming up, and this is how you know it all worked!
- (Otherwise, an error message should come up below and in the terminal. In my case, the terminal output suggested it couldn't connect to JACK, and it turned out it was the Flatpak allow step that was missed.)

The ASIO device should be ready to go, connected to Pipewire JACK! It should be simply called 'WineASIO', for any programs that should require its name.

## References

Notably, some of these details I stumbled across were seemingly out of date in some spots, so I wanted to post my own post/guide. They did help me put this together though, so here are the references:

- https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1495
- https://github.com/theNizo/linux_rocksmith/blob/main/guides/setup/fed-pipewire.md
7 changes: 5 additions & 2 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,18 @@ a.no-link {
}
a.cc {
text-decoration: none;
margin-left: 0.05rem;
margin-left: 0.5rem;
}

li {
margin: 0.2rem 0;
}

pre,
code,
pre code span {
background-color: #323232 !important;
font-family: "Fantasque Sans Mono", Monaco, Menlo, monospace;

}

pre, code {
Expand Down

0 comments on commit 1857518

Please sign in to comment.