# 4. Platform Details | Linux

## Linux Specific Starter Guide

### SDK Version

FMOD is compiled using the following tools.

- LLVM/Clang - version 10.

### Compatibility

FMOD supports systems that provide ALSA v0.9.0rc4 or newer for the following architectures:

- x86 - requires SSE2, optimized with SSE3 if detected at runtime, minimum GNU C library GLIBC_2.2, minimum GNU C++ library CXXABI_1_3, GLIBCXX_3.4.
- x86_64 - requires SSE2 (implied by x86_64), optimized with SSE3 or AVX if detected at runtime, minimum GNU C library GLIBC_2.2.5, minimum GNU C++ library CXXABI_1_3, GLIBCXX_3.4.
- arm - requires armv7 or newer with NEON, hard float ABI (gnueabihf), minimum GCC library GCC_3.5, minimum GNU C library GLIBC_2.4, minimum GNU C++ library CXXABI_1_3, GLIBCXX_3.4.
- arm64 - requires armv8, minimum GCC library GCC_3.5, minimum GNU C library GLIBC_2.17, minimum GNU C++ library CXXABI_1_3, GLIBCXX_3.4.

### Libraries

Substitute $ARCH with your desired architecture from the 'Compatibility' list above.

FMOD Core Engine library

- /api/core/lib/$ARCH/libfmod.so - Release binary for production code.
- /api/core/lib/$ARCH/libfmodL.so - Release binary with logging enabled for development.

FMOD Studio Engine library (used in conjunction with core library)

- /api/studio/lib/$ARCH/libfmodstudio.so - Release binary for production code.
- /api/studio/lib/$ARCH/libfmodstudioL.so - Release binary with logging enabled for development.

### Device Selection

FMOD defaults to using PulseAudio if available if no device is specified via System::setOutput. The environment variable `FMOD_ALSA_DEVICE` can be used to override this behavior, causing FMOD to use ALSA by default. It will also select the device specified by the variable value, if found, by default. Device names are as specified by the output of `aplay -L`.

### Thread Affinity

All threads will default to FMOD_THREAD_AFFINITY_CORE_ALL, it is not currently possible to override this with Thread_SetAttributes.

### Thread Priority

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

- FMOD_THREAD_PRIORITY_LOW ~ 75
- FMOD_THREAD_PRIORITY_MEDIUM ~ 80
- FMOD_THREAD_PRIORITY_HIGH ~ 85
- FMOD_THREAD_PRIORITY_VERY_HIGH ~ 90
- FMOD_THREAD_PRIORITY_EXTREME ~ 97
- FMOD_THREAD_PRIORITY_CRITICAL ~ 99

### Troubleshooting

System::init returns FMOD_ERR_PLUGIN_MISSING:
This can happen if your machine is missing the ALSA library `libasound.so.2` for the desired architecture, almost any version of it will be sufficient. Please note that if you are on an x86_64 platform running an x86 application using FMOD you will need the x86 version of ALSA installed also.

## Performance Reference

This section is a companion for the CPU Performance white paper 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.

### Voice 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 FMOD Studio API using recommended configuration settings.

#### Settings

- Voice count: 64
- Sample rate: 48KHz
- Speaker mode: Stereo
- DSP block size: 1024 samples

#### Test Device

- CPU: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
- OS: Ubuntu 20.10

#### Results

- DSP with Vorbis: 15.41% (+/- 3.01%)
- DSP with FADPCM: 6.31% (+/- 0.25%)
- DSP with PCM: 2.65% (+/- 0.17%)
- Update at 60 FPS: 1.61% (+/- 0.16%)