This fork adds ability to set host specific stream parameters. Currenlty only added WASAPI.
JPortAudio is a Java wrapper for the PortAudio audio library. It provides blocking read/write streams. JPortAudio can provide high resolution, eg. FLOAT data and multi-channel streams that JavaSound does not support.
You may have an old installation of JPortAudio. You can remove it.
rm $HOME/Library/Java/Extensions/jportaudio.jar
rm $HOME/Library/Java/Extensions/libjportaudio.jnilib
You can download PortAudio from GitHub or from the website.
cd portaudio
./configure
make clean
make install
On MacOS, you may need to tell CMAKE where to look for stdio.h.
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
This should work on Linux and Mac.
cd portaudio-java
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib
cmake .
make install
ls -l /usr/local/lib/lib*portaudio*
You might need to use "sudo make install".
./gradlew clean assemble
ls -al build/libs # see JAR file
To use JPortAudio with your projects or IDE, include the JAR file in your classpath.
Be ready to turn down your speakers. It will play some sine tones that may be loud.
./gradlew clean test