Fork me on GitHub


MFSampledSP is a free, better-than-nothing, Windows-7-or-later implementation of some of the javax.sound.sampled.spi interfaces. It is part of the SampledSP collection of javax.sound.sampled libraries. 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 linear signed PCM. No other conversions are supported. This also means that AudioFormat objects should be interpreted with a grain of salt.

Getting Started

The easiest way to use MFSampledSP (other than simply using the jar) 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:


If Maven can't resolve this dependency, you might also want to add the following repository to the repositories section of your pom:

    <name>beaTunes Repository</name>

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 and Java 7 or later.

For a service provider implementation for macOS, based on Apple's CoreAudio, check out CASampledSP.

For a cross platform service provider implementation featuring free formats like FLAC, OGG, and MP3 take a look at FFSampledSP.