# 4. Platform Details | Mac

## macOS Specific Starter Guide

### SDK Version

FMOD is compiled using the following tools.

- Xcode - version 15.0.1 targeting macOS 14.0.

### Compatibility

FMOD supports x86_64 and arm64 back to macOS 10.13. Please note that both x86 and PPC are not accepted for submission to the Mac App Store and thus are no longer supported by FMOD.

### Libraries

FMOD Core Engine library

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

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

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

### Latency

The default latency introduced by FMOD for this platform is 4 blocks of 512 samples at a sample rate of 48KHz, which equates to approximately 43ms. You are free to change this using two APIs, System::setDSPBufferSize and System::setSoftwareFormat but there are some important considerations.

All audio devices have a number of samples they prefer to operate in, on Mac this is almost always 512, which makes our default a natural fit. If you use System::setDSPBufferSize to reduce FMODs granularity (to 256 samples for instance), be aware the audio device will still operate at its native block of 512 samples. If you would like to reduce the block size of the audio device (to 256 samples), after you have set the FMOD granularity and initialized the System object use the following code:

    AudioUnit audioUnit;
    gSystem->getOutputHandle((void **)&audioUnit);

    AudioDeviceID audioDeviceID;
    UInt32 audioDeviceIDSize = sizeof(audioDeviceID);
    AudioUnitGetProperty(audioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, &audioDeviceID, &audioDeviceIDSize);

    UInt32 bufferFrameSize = 256;
    AudioDeviceSetProperty(audioDeviceID, NULL, 0, FALSE, kAudioDevicePropertyBufferFrameSize, sizeof(bufferFrameSize), &bufferFrameSize);

### 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 ~ 83
- FMOD_THREAD_PRIORITY_MEDIUM ~ 87
- FMOD_THREAD_PRIORITY_HIGH ~ 90
- FMOD_THREAD_PRIORITY_VERY_HIGH ~ 94
- FMOD_THREAD_PRIORITY_EXTREME ~ 97
- FMOD_THREAD_PRIORITY_CRITICAL ~ 99

## 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.

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

#### Settings

- Real channel count: 64
- Sample rate: 48KHz
- Speaker mode: Stereo
- DSP block size: 512 samples

#### Test Device

- CPU: Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
- OS: macOS 10.15.7 (19H2)

#### Results

- DSP with Vorbis: 7.78% (+/- 0.95%)
- DSP with FADPCM: 4.90% (+/- 0.61%)
- DSP with PCM: 2.93% (+/- 0.58%)
- Update at 60 FPS: 1.81% (+/- 0.35%)