JuliaAudio / PortAudio.jl

PortAudio wrapper for the Julia programming language, compatible with the JuliaAudio family of packages
Other
114 stars 20 forks source link

JACK support? #49

Open OliverEvans96 opened 4 years ago

OliverEvans96 commented 4 years ago

I see a few references to JACK in the README and code, but when I run PortAudio.devices(), only my ALSA devices are showing up, even though my JACK server is running and accessible to other programs.

On a related note, I see that JACKAudio.jl has severely atrophied over the last few years. I'm wondering if it's worth resurrecting, or whether the same functionality is/should be available through this package.

Thanks! Oliver

ssfrr commented 4 years ago

JACKAudio has indeed gone unmaintained and honestly I doubt I'll have time to resurrect it. Portaudio can be compiled with support for JACK, but I haven't been able to get it working yet.

The BinaryBuilder philosophy is to build everything from source all the way down, but both JACK1 and JACK2 have dependencies that made them tricky to build.

The script that builds our portaudio binaries is here - that's what needs to be tweaked to add JACK support.

One approach I've considered is seeing if we can just install JACK from binary packages during the libportaudio build process just to add support to portaudio, but I haven't had time to try it out. It looks like alpine linux has a jack package, so that might be worth trying.

hagi123456 commented 3 years ago

A colleague and I tried to make PortAudio work with Jack. At least for linux-x86-64 this works, I tested with a loopback on debian buster. Moving the library into the target directories for the different platform might be not working. But probably there is a better way to do it. For now, I have manually extracted the tarball into the corresponding artifacts folder.

Here is the diff to the build_tarballs.jl from Yggdrasil:

diff --git a/build_portaudio_with_jack_tarballs.jl b/build_tarballs_from_Yggdrasil.jl
index a5347ae..fdb53d5 100644
--- a/build_portaudio_with_jack_tarballs.jl
+++ b/build_tarballsYggdrasil.jl
@@ -26,12 +26,6 @@ sources = [
 script = raw"""
 cd $WORKSPACE/srcdir

-apk add jack
-apk add jack-dev
-cp -r /usr/include/jack /opt/$target/$target/sys-root/usr/include/
-cp -r /usr/lib/jack /opt/$target/$target/sys-root/usr/lib/
-cp /usr/lib/libjack* /opt/$target/$target/sys-root/usr/lib/
-
 # move the ASIO SDK to where CMake can find it
 if [ -d "asiosdk2.3.1" ]; then
     mv "asiosdk2.3.1 svnrev312937/ASIOSDK2.3.1" asiosdk2.3.1
@@ -55,9 +49,7 @@ install_license "${WORKSPACE}/srcdir/portaudio/LICENSE.txt"

 # These are the platforms we will build for by default, unless further
 # platforms are passed in on the command line
-platforms = [
-    Linux(:x86_64, libc=:glibc)
-    Linux(:x86_64, libc=:musl)
-]
+platforms = supported_platforms()

 # The products that we will ensure are always built
 products = [
hagi123456 commented 3 years ago

Sorry, the diff is in the wrong direction