FMOD Engine User Manual 2.03
FMOD is compiled using the following tools.
FMOD supports the below architectures back to Windows 7.
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.
The C API of the supplied libraries are compatible with MinGW (C++ ABI not supported). The 64 bit dll can be linked directly. You will need to use the import library libfmod.a and libfmodstudio.a in order to link the 32 bit dlls.
If you encounter issues linking fmod with MinGW, ensure that you are following the GCC linker ordering requirements and the MinGW library search order.
Core API library
Studio API library (used in conjunction with the Core API library)
Before calling any FMOD functions it is important to ensure COM is initialized. You can achieve this by calling CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED)
on each thread that will interact with the FMOD Engine. This is balanced with a call to CoUninitialize()
when you are completely finished with all calls to FMOD.
If you fail to initialize COM, FMOD will perform this on-demand for you issuing a warning. FMOD will not uninitialize COM in this case so it will be considered a memory leak.
To ensure correct behavior FMOD assumes when using the WASAPI output mode (default for Windows Vista and newer) that you call System::getNumDrivers, System::getDriverInfo and System::init from your UI thread. This ensures that any platform specific dialogs that need to be presented can do so. This recommendation comes from the IAudioClient interface docs on MSDN which state:
In Windows 8, the first use of IAudioClient to access the audio device should be on the STA thread. Calls from an MTA thread may result in undefined behavior.
If using FMOD_OUTPUTTYPE_ASIO with the C# wrapper, FMOD will need to be running on the STA thread to ensure COM is intialized correctly. This can be achieved by adding the STAThreadAttribute to the main method:
[STAThread]
static void Main(string[] args)
{
Factory.System_Create(out FMOD.System system);
system.setOutput(OUTPUTTYPE.ASIO);
system.init(32, INITFLAGS.NORMAL, IntPtr.Zero);
}
Building for ARM64 requires Visual Studio 2019 with toolset v142 and supports NEON.
The following are not supported:
The following are not supported:
The following are not supported:
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.
The relationship between FMOD platform agnostic thread priority and the platform specific values is as follows:
Windows supports the following port types when using FMOD_OUTPUTTYPE_WINSONIC:
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);
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);
Platform-specific object spatialization technologies can potentially offer more accurate spatialization than the FMOD spatializer effect. To take advantage of Windows Sonic to spatialize your events, you can use an FMOD object spatializer effect instead of an FMOD spatializer. Doing so bypasses any subsequent effects or sends, instead routing the event's audio from the FMOD object spatializer directly to Windows Sonic for object spatialization.
Most platforms can only handle a limited number of object-spatialized sounds, so the FMOD object spatializer effect is best reserved for use with important events.
Your machine must be configured to enable Windows Sonic. To enable Windows Sonic on Windows:
For more information about object spatialization, see the Spatialization Options and Auditioning Object Spatialization and Height Panning sections of the FMOD Studio User Manual and the Spatial Audio White Paper section of the FMOD Engine User Manual.
This section is a companion for the CPU Performance white paper and serves as a quick reference of facts targeting this platform.
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.
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.