QTSampledSP is a free, better-than-nothing, 32 bit implementation of some of the the javax.sound.sampled.spi interfaces. Its main purpose is to decode audio from various formats at high speed. Examples for supported formats are MP3 or AAC. That said, QTSampledSP more or less supports all formats also supported by Apple's QuickTime.
Note that unlike other providers, QTSampledSP always converts audio data on-the-fly into LPCM. No other conversions are supported. This also means that AudioFormat objects should be interpreted with a grain of salt.
Because QTSampledSP depends on native code, you need to add the provided jnilib/dll to your library path and the provided jar to your classpath. You also need QuickTime installed. Everything else is taken care of automatically.
To do so, add something like this to the dependencies section of your pom:
<!-- for OS X: --> <dependency> <groupId>com.tagtraum</groupId> <artifactId>qtsampledsp-osx</artifactId> <version>0.9.6</version> <type>jnilib</type> </dependency> <!-- for Windows: --> <dependency> <groupId>com.tagtraum</groupId> <artifactId>qtsampledsp-win</artifactId> <version>0.9.6</version> <type>dll</type> </dependency>
If Maven can't resolve this dependency, you might also want to add the following repository to the repositories section of your pom:
<repository> <id>beatunes</id> <name>beaTunes Repository</name> <url>http://www.beatunes.com/repo/maven2</url> </repository>
As long as the native library is in the same directory as the QTSampledSP jar, it will be picked up. If that's not the case, the native library needs to be renamed according to platform rules (i.e. libqtsampledsp.dll or qtsampledsp.dll).
To use the library, simply use the javax.sound.sampled classes like you normally would.
On OSX, QTSampledSP requires QuickTime 7, OS X 10.5 or later and an Intel processor. Only 32 bit are supported. On Windows, QTSampledSP requires QuickTime 7 and Windows XP or later. Only 32 bit are supported.
For a 64 bit service provider implementation for OS X, based on Apple's CoreAudio, check out CASampledSP.