[Dev] Add build instructions for asio windows (patch)

Matthieu TALBOT matthieu at talbot.audio
Fri May 15 18:44:00 CEST 2020


Hey,

As discussed in matrix, here is the patch for adding build instructions 
for asio windows. I got it working on commit 
697434e58823a6e3acc5318b62747c7519271303 (origin/bugfixes), with diff:

diff --git a/scripts/gen-translators-list.scm 
b/scripts/gen-translators-list.scm
index 95963159..14f1eef7 100755
--- a/scripts/gen-translators-list.scm
+++ b/scripts/gen-translators-list.scm
@@ -89,9 +89,10 @@ Args:
                   (newline)
                   (for-each
                     (lambda (translator)
-                     (display
-                       (string-append
-                         "\"" translator))
+                     ;(display
+                     ;  (string-append
+                     ;    "\"" translator))
+(display "\"test")
                       (if (equal? (last translators)
                                   translator)
                         (display "\"")
diff --git a/src/audio/engine_rtaudio.c b/src/audio/engine_rtaudio.c
index dff4e985..62dff9f7 100644
--- a/src/audio/engine_rtaudio.c
+++ b/src/audio/engine_rtaudio.c
@@ -89,7 +89,8 @@ engine_rtaudio_create_rtaudio (
    rtaudio_t rtaudio =
      rtaudio_create (
  #ifdef _WOE32
-      RTAUDIO_API_WINDOWS_WASAPI
+      //RTAUDIO_API_WINDOWS_WASAPI
+      RTAUDIO_API_WINDOWS_ASIO
  #elif defined(__APPLE__)
        RTAUDIO_API_MACOSX_CORE
  #else
@@ -146,8 +147,11 @@ engine_rtaudio_setup (
        g_message (
          "RtAudio device %d: %s",
          i, dev_nfo.name);
-      if (string_is_equal (
-            dev_nfo.name, out_device, 1))
+     // if (string_is_equal (
+     //       dev_nfo.name, out_device, 1))
+       if (string_is_equal (
+            dev_nfo.name, out_device, 1) &&
+          dev_nfo.output_channels > 0)
          {
            out_device_id = i;
          }

Best,

Matthieu

-------------- next part --------------
From 697434e58823a6e3acc5318b62747c7519271303 Mon Sep 17 00:00:00 2001
From: MartyLake <matthieu at talbot.audio>
Date: Fri, 15 May 2020 18:39:57 +0200
Subject: [PATCH 1/1] Add build instructions for asio windows

---
 doc/dev/windows-build.md | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/doc/dev/windows-build.md b/doc/dev/windows-build.md
index 50690ba9..d815ffb6 100644
--- a/doc/dev/windows-build.md
+++ b/doc/dev/windows-build.md
@@ -79,6 +79,35 @@ Make sure it matches with your installation path.
 
 To open the terminal hit `ctrl`+`` ` ``
 
+### ASIO
+
+Because of copyright issues, you cannot distribut a build of ASIO. However, you can build one for yourself.
+
+## Building rtaudio with ASIO support
+
+Download and install visual studio community edition and cmake. Make sure cmake is available in your path.
+Start a windows cmd.
+
+```
+# Clone the rt audio repository
+git clone https://github.com/thestk/rtaudio.git --single-branch
+cd rtaudio
+mkdir build
+cd build
+# Configure with asio enabled, and point the prefix to your mingw64 install dir (no trailing slash!)
+cmake .. -DRTAUDIO_API_ASIO=ON -DCMAKE_INSTALL_PREFIX="C:/msys64/mingw64"
+# Build and install
+cmake --build . --config Release
+cmake --install .
+```
+
+## Activate rtaudio from meson
+Then from msys2 mingw64, you can build with:
+```
+# non empty output means install was successful
+pkg-config --list-all | grep rtaudio
+meson build -Denable_rtaudio=auto
+```
 ----
 
 Copyright (C) 2020 Sidar Talei
-- 
2.26.2.windows.1



More information about the Dev mailing list