FMP Core uses audio backends to actually play audio. It comes with a NAudio backend, which is good for playing audio on Windows, but if you need to play additional file types, or if you need to run on other platforms, you'll need to include other backends in your project.

Including extra backends

FMP searches for audio backends in 2 places: %appdata%/FRESHMusicPlayer/Backends, and Backends in the directory where the app is. The former directory is mostly there for users to extend FMP. Put any backends you want to bundle with your app in a Backends folder, and then copy them over to the output directory.

Making your own backends

To make your own audio backend, create a .NET Standard (if you're targeting FMP-Avalonia and .NET Core/5 apps in general), or a .NET Framework (if you're targeting FMP-WPF and .NET Framework apps) class library that implements IAudioBackend.

Some extra notes:

  • Volume is a range between 0 - 1.
  • OnPlaybackStopped is expected to be invoked when stopping or changing tracks (not when pausing)
  • Since FMP Core was originally written for just NAudio, if you have any doubts about behavior, you should probably look at NAudio.