FFmpeg based service provider for javax.sound.sampled.
Java C CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ffsampledsp-complete
ffsampledsp-i386-macos
ffsampledsp-i386-win
ffsampledsp-java
ffsampledsp-test
ffsampledsp-universal
ffsampledsp-x86_64-macos
ffsampledsp-x86_64-win
src
.gitignore
LICENSE.txt
NOTES.txt
README.md
pom.xml

README.md

FFSampledSP

Maven Central

FFSampledSP is an implementation of the javax.sound.sampled service provider interfaces based on FFmpeg, a complete, cross-platform solution to record, convert and stream audio and video. FFSampledSP is part of the SampledSP collection of javax.sound.sampled libraries.

Its main purpose is to decode audio files or streams to signed linear pcm.

FFSampledSP makes use of the "tagtraum FFmpeg package".

Binaries and more info can be found at its tagtraum home.

Build

Currently you can only build this library on macOS.

To do so, you also need:

Once you have all this, you need to adjust some properties in the parent pom.xml. Or.. simply override them using -Dname=value notation. E.g. to point to your Windows JNI headers, add

-Dmingw.headers.jni=/mywindowsjdk/include

to your mvn call. If you didn't add the bin folder of your crosscompiler to the PATH, you might also want to set -Dmingw.i386.path=... and -Dmingw.x86_64.path=... You might also need to change mmacosx-version-min and isysroot, if you don't have an OS X 10.11 SDK installed.

So all in all, something like the following might work for you, depending on where you installed the Windows JNI headers, MinGW-w64, and the macOS JDK:

mvn -Ddarwin.headers.jni=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include/ \
    -Dmingw.headers.jni=/Users/YOUR_ID/mywindowsjdk/include \
    -Dmingw.i386.path=/Users/YOUR_ID/mingw/mingw-w32-i686/bin \
    -Dmingw.x86_64.path=/Users/YOUR_ID/mingw/mingw-w32-i686/bin \
    -Dmmacosx-version-min=10.10 \
    -Disysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ \
    clean install

Note, that the C sources in the ffsampledsp-x86_64-macos module are expected to compile on all supported platforms. In fact, the very same sources are compiled in the modules for other platforms.

Warranty

This library comes with absolutely no support, warranty etc. you name it. Please see LICENSE.txt for licensing details.

Enjoy