Platform Details | Universal Windows Platform

17. Platform Details | Universal Windows Platform

UWP Specific Starter Guide

SDK Version

FMOD is compiled using the following tools.

  • Visual Studio - version 2017 targeting platform toolset v141

Compatibility

FMOD supports devices of the below architectures running Windows 10.

  • x86 - optimized with SSE3.
  • x64 - optimized with SSE3 (and AVX if detected at runtime).
  • arm - optimized with VFPv2 (and NEON if detected at runtime).

Libraries

The provided libs are import libraries which require the corresponding DLL to be present at runtime. Substitute $ARCH your desired architecture from the 'Compatibility' list above.

Core API library

  • /api/core/lib/$ARCH/fmod.lib - Release binary for production code (requires fmod.dll at runtime).
  • /api/core/lib/$ARCH/fmodL.lib - Release binary with logging enabled for development (requires fmodL.dll at runtime).

Studio API library (used in conjunction with the Core API library)

  • /api/studio/lib/$ARCH/fmodstudio.lib - Release binary for production code (requires fmodstudio.dll at runtime).
  • /api/studio/lib/$ARCH/fmodstudioL.lib - Release binary with logging enabled for development (requires fmodstudioL.dll at runtime).

Plug-ins

FMOD includes a media foundation plug-in codec that can optionally be included in your game.

  • /api/plugins/media_foundation/lib/$ARCH/media_foundation.dll

This has been separated in order to support Windows N by default - the media foundation plug-in is NOT compatible with Windows N unless the user installs the appropriate Media Feature Pack for Windows.

If included, FMOD can use the codec to support WMA, ASF, WMV, M4A and MP4 files.

Permissions

Some functionality inside of FMOD will require you set relevant capabilities in your manifest file.

  • Microphone - to make use of the System::recordStart API, see Known Issues for further notes about recording.
  • Internet (Client) - to stream audio from the internet.
  • Private Networks (Client & Server) - to use FMOD profiler or FMOD Studio live update. See Known Issue for further notes about connecting.

Thread Affinity

All threads will default to FMOD_THREAD_AFFINITY_CORE_ALL, this is recommended due to the wide variety of PC hardware but can be customized with Thread_SetAttributes.

Thread Priority

The relationship between FMOD platform agnostic thread priority and the platform specific values is as follows:

Port Support

UWP supports the following port types when using FMOD_OUTPUTTYPE_WINSONIC:

Background Music

The background music will bypass the operating system's virtual speaker processing.

Below is a usage demonstration with error checking omitted for brevity:

FMOD::ChannelGroup *bgm;
system->createChannelGroup("BGM", &bgm);
system->attachChannelGroupToPort(FMOD_PORT_TYPE_MUSIC, FMOD_PORT_INDEX_NONE, bgm);

FMOD::Channel* channel;
system->playSound(music, bgm, false, &channel);

Pass Through

Use this port to bypass the operating system's virtual speaker processing for non-diegetic sounds.

Below is a usage demonstration with error checking omitted for brevity:

FMOD::ChannelGroup *passthrough;
system->createChannelGroup("PASSTHROUGH", &passthrough);
system->attachChannelGroupToPort(FMOD_PORT_TYPE_PASSTHROUGH, FMOD_PORT_INDEX_NONE, passthrough);

FMOD::Channel *channel;
system->playSound(your_non_diegetic_sound, passthrough, false, &channel);

Known Issues

  • Even after adding support for audio recording to your application manifest, you must still make sure to call System::recordStart in the UI thread so the system can display a warning to the user. Calling from any other thread will return FMOD_ERR_OUTPUT_INIT.

  • FMOD Studio will not be able to connect to the engine if they are both running on the same machine. This is a restriction imposed by the Windows Universal Application environment.

Performance Reference

This section is a companion for the CPU Performance section of the Managing Resources in the Core API chapter and serves as a quick reference of facts targeting this platform.

Format Choice

Each compression format provided in FMOD has a reason for being included, the below list will detail our recommendations for this platform. Formats listed as primary are considering the best choice, secondary formats should only be considered if the primary doesn't satisfy your requirements.

  • Vorbis: Primary format for all sounds.
  • FADPCM: Secondary format if Vorbis CPU usage is too high for low spec machines.
  • PCM: Not recommended.
  • XMA: Unavailable.
  • AT9: Unavailable.

Channel Count

To give developers an idea about the costs of a particular format we provide synthetic benchmark results. These results are based on simple usage of the Studio API using recommended configuration settings.

Settings

  • Real channel count: 64
  • Sample rate: 48 kHz
  • Speaker mode: Stereo
  • DSP block size: 1024 samples

Test Device

  • CPU: Intel(R) Core(TM) i5-6400T CPU @ 2.20GHz
  • OS: Microsoft Windows [Version 10.0.19042.867]

Results

  • DSP with Vorbis: 6.45% (+/- 0.66%)
  • DSP with FADPCM: 3.00% (+/- 0.34%)
  • DSP with PCM: 1.33% (+/- 0.22%)
  • Update at 60 FPS: 0.77% (+/- 0.19%)