aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-05-23 11:03:35 +0200
committerSven Gothel <[email protected]>2023-05-23 11:03:35 +0200
commitbaa2c31d9e4b49f72323e38c7d6fc59affaa29bc (patch)
treee817a10fd29d26c48e8ef45632dedb8b016c449c /scripts
parentdb19c1bb94cb1b33ecfedaf113057c0e18e6b01a (diff)
JOAL/OpenAL: Adjust build.xml for gluegen-rt + joal jars; Add com.jsyn.devices.openal.ALDevice for JOAL/OpenAL (todo: input)
Adding ALDevice source code for an JOAL/OpenAL AudioDeviceManager. Input is currently missing, output working and manually tested for low latency. AudioDeviceFactory has ALDevice added with priority over JPortAudio. Not sure how to customize this, but this surely can change if desired. When adding input later on, 'preferJavaSound' might not be desired anymore? Note: To enjoy spatial 3D features w/ OpenAL, the source must be mono only! +++ Perhaps attach our java-source-zip files to the gluegen-rt.jar and joal.jar to have API source documentation: - https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/jar/gluegen-java-src.zip - https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/jar/joal-java-src.zip +++ Note: The added libs/gluegen-rt.jar and libs/joal.jar are java only w/o native libs. Hence one needs to add a either gluegen and joal native library jar files or just use the full jogamp-fat.jar. Used version is v2.5.0-rc-20230523 jogamp-fat.jar (* recommended and used in scripts/tests.sh *) https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/fat/jogamp-fat.jar All single jar files https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/jar/ 7z archive file of all single files w/o fat https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/archive/jogamp-all-platforms.7z
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tests.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/scripts/tests.sh b/scripts/tests.sh
new file mode 100755
index 0000000..9580741
--- /dev/null
+++ b/scripts/tests.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+# set -x
+
+#
+# See https://github.com/kcat/openal-soft/blob/master/docs/env-vars.txt
+# export ALSOFT_LOGLEVEL=3
+#
+
+javaexe=`which java`
+
+rm -f java-run.log
+
+function jrun() {
+ #D_ARGS="-Djogamp.debug=all"
+ #D_ARGS="-Djogamp.debug.Bitstream"
+ #D_ARGS="-Djogamp.debug.NativeLibrary=true -Djoal.debug=true"
+ #D_ARGS="-Djogamp.debug.AudioSink"
+ #D_ARGS="-Djogamp.debug.AudioSink -Djoal.debug.AudioSink.trace"
+ #D_ARGS="-Djoal.debug.AudioSink.trace"
+ #D_ARGS="-Djoal.debug=all"
+ #D_ARGS="-Djogamp.debug.JNILibLoader"
+ #D_ARGS="-Djogamp.debug.NativeLibrary=true -Djogamp.debug.JNILibLoader=true"
+ #X_ARGS="-verbose:jni"
+ #X_ARGS="-Xrs"
+
+ # StartFlightRecording: delay=10s,
+ # FlightRecorderOptions: stackdepth=2048
+ # Enable remote connection to jmc: jcmd <PID> ManagementAgent.start jmxremote.authenticate=false jmxremote.ssl=false jmxremote.port=7091
+ # X_ARGS="-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints $X_ARGS"
+ # X_ARGS="-XX:FlightRecorderOptions=stackdepth=2048,threadbuffersize=16k $X_ARGS"
+ # X_ARGS="-XX:StartFlightRecording=delay=10s,dumponexit=true,filename=java-run.jfr $X_ARGS"
+
+ for i in dist/lib/jsyn-????????.jar ; do
+ jsynjar=$i
+ done
+ for i in dist/lib/jsyn-examples-????????.jar ; do
+ jsynexamplesjar=$i
+ done
+ echo Using jsyn $jsynjar
+ echo Using jsyn-examples $jsynexamplesjar
+
+ #CLASSPATH=libs/gluegen-rt.jar:libs/joal.jar:$jsynjar:$jsynexamplesjar
+ CLASSPATH=libs/jogamp-fat.jar:$jsynjar:$jsynexamplesjar
+
+ echo
+ echo "Test Start: $*"
+ echo
+ echo "$javaexe" $X_ARGS -cp $CLASSPATH $D_ARGS $C_ARG $*
+ "$javaexe" $X_ARGS -cp $CLASSPATH $D_ARGS $C_ARG $*
+ echo
+ echo "Test End: $*"
+ echo
+}
+
+function testnormal() {
+ jrun $* 2>&1 | tee -a java-run.log
+}
+
+testnormal com.jsyn.apps.AboutJSyn
+#testnormal com.jsyn.examples.PlayNotes
+#testnormal com.jsyn.examples.PlayFunction
+