SPI javax.sound.sampled.spi.MixerProvider for CleanSine javasound dynamic libraries. Available native implementations:
- WASAPI exclusive https://github.com/pavhofman/csjsound-wasapi
- Linux ALSA PCM devices (as listed in aplay -L) https://github.com/pavhofman/csjsound-alsapcm
mvn package
The jar already includes the SPI service configuration in META-INF.
The provider expects os-specific library name csjsound extended with os.arch
Example:
csjsound_amd64.dll
, libcsjsound_amd64.so
, libcsjsound_aarch64.so
The library location is specified by standard java property -Djava.library.path
.
The package uses slf4j API and slf4j-simple implementation, configurable via java properties. Example of settings:
-Dorg.slf4j.simpleLogger.defaultLogLevel=debug
-Dorg.slf4j.simpleLogger.logFile=System.out
-Dorg.slf4j.simpleLogger.showDateTime=True
-Dorg.slf4j.simpleLogger.showShortLogName=True
# this is important for time-aligning the java and DLL logs
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss.SSS
Logging paramaters are passed from the java provider to native library in native init method params SimpleMixerProvider.nInit()
, read from java properties:
values: trace
, debug
, info
, warn
, error
If no csjsoundLibLogLevel
is specified, the current SLF4J level is applied.
values: stdout
, stderr
, path to a writable log_file
If no csjsoundLibLogFile
is configured, the following default file is passed to the native library:
libLogTarget = System.getProperty("user.home") + "/csjsound-lib.log";
Notes:
- the ALSA-PCM implementation ignores this configuration and outputs to stdout at level defined in compile time
- the current WASAPI excl. implementation outputs to stdout even for
csjsoundLibLogFile=stderr