SampledSP is probably the most comprehensive collection of Java libraries for decoding sampled audio on Windows and OS X.
For many many years multimedia capabilities of Java have been modest at best. Without additional libraries it is not even possible to play an mp3 file or resample a regular wave file. SampledSP libraries fill the gaps. Mostly based on native audio libraries like CoreAudio, Media Foundation, FFmpeg and QuickTime, SampledSP libraries provide Java wrappers for the underlying engines and integrate seamlessly through the implementation of javax.sound.sampled.spi-interfaces. Hence the name SampledSP.
SampledSP are extremely simple to use. Just add a jar to the classpath and (in most cases) a
native library to the
java.library.path. Then proceed to use Java's
like you normally would. That's it.
- PCMSampledSP - pure Java conversion provider for resampling audio
- CASampledSP - CoreAudio based implementation for OS X
- MFSampledSP - Media Foundation based implementation for Windows >= 7
- QTSampledSP - QuickTime based implementation for 32bit Windows and OS X
- FFSampledSP - FFmpeg based implementations for Windows and OS X
Java Audio Resources
Even though it has not been edited in quite a while, Java Sound Resources still answers many important questions regarding audio on Java.
As part of the Java Tutorials, Oracle offers a
Sound Trail. In order to get the gist
of how the Java Sound API works, this is a pretty good starting point.
But note that the Java Media Framework API (JMF) advertised in the trail, has been abandoned a long time ago. If you're interested in simply playing back some mp3 files, you are probably better off using the JavaFX MediaPlayer, which can also be embedded in Swing applications. However, JavaFX does not give you access to any raw PCM data like
If you'd like to analyze audio, you might also be interested in the jipes analysis framework.