Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low latency audio on Linux #320

Open
Tearnote opened this issue May 27, 2018 · 3 comments
Open

Low latency audio on Linux #320

Tearnote opened this issue May 27, 2018 · 3 comments

Comments

@Tearnote
Copy link

jPortAudio does not have a Linux version, and probably never will. This leaves Linux only with "OpenAL (LibGDX Sound)", which feels a lot more delayed than PortAudio on Windows. A lower latency option for Linux should be made available, if one exists.

@narcow
Copy link

narcow commented Jan 9, 2020

From my understanding, the current standard for low-latency audio on Linux is JACK. The JACK audio server also exists for other platforms (including Windows and OSX), so it would potentially be a new cross-platform option rather than something for Linux only.

@0e4ef622
Copy link

0e4ef622 commented Nov 5, 2020

Apparently you can compile jportaudio on linux no problem and it works? Here's what I did:

$ git clone --depth=1 'https://github.com/portaudio/portaudio'
$ cd portaudio/bindings/java/c/src
$ gcc -fPIC *.c -shared -o libjportaudio.so -I/usr/lib/jvm/java-8-openjdk/include -I/usr/lib/jvm/java-8-openjdk/include/linux -lportaudio

I'm on Arch Linux, so you might need to change the include paths.

Now you should have libjportaudio.so, you can put this wherever.

Then, add to beatoraja-config.command

export LD_LIBRARY_PATH="/path/to/directory/containing/libjportaudio.so/"
export LD_PRELOAD="/usr/lib/libportaudio.so" # might be different depending on your distro

@ars-magna
Copy link

Apparently you can compile jportaudio on linux no problem and it works? Here's what I did:

$ git clone --depth=1 'https://github.com/portaudio/portaudio'
$ cd portaudio/bindings/java/c/src
$ gcc -fPIC *.c -shared -o libjportaudio.so -I/usr/lib/jvm/java-8-openjdk/include -I/usr/lib/jvm/java-8-openjdk/include/linux -lportaudio

I'm on Arch Linux, so you might need to change the include paths.

Now you should have libjportaudio.so, you can put this wherever.

Then, add to beatoraja-config.command

export LD_LIBRARY_PATH="/path/to/directory/containing/libjportaudio.so/"
export LD_PRELOAD="/usr/lib/libportaudio.so" # might be different depending on your distro

Brilliant, this workaround has me set for the moment, thank you for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants