MFSampledSP is a free, better-than-nothing, Windows-7-or-later implementation of some of 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, MFSampledSP supports all formats also supported by Microsoft's Media Foundation.
Note that unlike other providers, MFSampledSP 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 MFSampledSP depends on native code, you need to add the provided dlls to your library path and the provided jar to your classpath. Everything else is taken care of automatically.
The easiest way to use MFSampledSP (other than simply using the jar and dlls) is to start a Maven project and introduce a MFSampledSP dependency.
To do so, add something like this to the dependencies section of your pom:
<dependency>
<groupId>com.tagtraum</groupId>
<artifactId>mfsampledsp</artifactId>
<version>[0.9.0,)</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.tagtraum</groupId>
<artifactId>mfsampledsp</artifactId>
<version>[0.9.0,)</version>
<type>dll</type>
<!-- 32 bit dll -->
<classifier>32</classifier>
</dependency>
<dependency>
<groupId>com.tagtraum</groupId>
<artifactId>mfsampledsp</artifactId>
<version>[0.9.0,)</version>
<type>dll</type>
<!-- 64 bit dll -->
<classifier>64</classifier>
</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 MFSampledSP jar, it will be picked up.
To use the library, simply use the javax.sound.sampled classes like you normally would.
MFSampledSP requires Windows 7 or later.
For a service provider implementation for OS X, based on Apple's CoreAudio, check out CASampledSP.
For a cross platform (OS X/Windows) 32 bit service provider based on QuickTime, check out QTSampledSP.