Preface
This is a small guide of how to compile and enable portaudio in beatoraja on osx, the guide includes some manual modifications, so it assumes that readers have the basic knowledge of computer and git.
This guide’s target is building the jportaudio.dylib on macos and make beatoraja reads it.
Process
- Download
portaudiolibrary bybrew install portaudio - Copy
portaudio.hfile to an library path like/usr/local/inlcude, you can find the file under/opt/homebrew/Cellar/portaudio[version]/include git clone https://github.com/philburk/portaudio-java- Edit
CMakeLists.txt
1 | cmake_minimum_required(VERSION 3.2) |
-
mkdir build cmake -B build cd build
After
You should be able to see a dylib file under build folder, and there should also be a dylib file under ~/Library/Java/Extensions/. The latter one is a ‘global’ installation. You should be able to use portaudio in beatoraja without any further changes. And if it still fails to find dylib file. Try:
- See files under ~/Library/Java/Extensions/, if the file is not named as
libjportaudio.dylib, try renaming it - If there’s no file under ~/Library/Java/Extensions/, try copying the dylib file from build directory. You can also place the file along with the raja’s jar file, it should be working too.