<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PHASE",
  "identifier" : "/documentation/PHASE/PHASESpatialMixerDefinition",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "PHASE"
    ],
    "preciseIdentifier" : "c:objc(cs)PHASESpatialMixerDefinition"
  },
  "title" : "PHASESpatialMixerDefinition"
}
-->

# PHASESpatialMixerDefinition

An audio-layering object that produces environmental effects and plays sound with a 3D position and orientation.

```
class PHASESpatialMixerDefinition
```

## Overview

This class enables the app to define a relationship between a source and listener in six degrees of freedom: orientation (roll, pitch, yaw) and a 3D position (x, y, z).

The framework plays back an audio source with *distance modeling* (see [`distanceModelParameters`](/documentation/PHASE/PHASESpatialMixerDefinition/distanceModelParameters)), direct path transmission effects and any combination of environmental effects, such as reverb (see [`PHASESpatialPipeline`](/documentation/PHASE/PHASESpatialPipeline)), and directivity (see [`listenerDirectivityModelParameters`](/documentation/PHASE/PHASESpatialMixerDefinition/listenerDirectivityModelParameters)). 

The result enables an app to implement directive point or omnidirectional sound sources — with or without direction, respectively — and volumetric sources with a defined shape.

For a walkthrough of spatial mixing, see [Playing sound from a location in a 3D scene](/documentation/PHASE/playing-sound-from-a-location-in-a-3d-scene).

## Topics

### Creating a Spatial Mixer

[`-  initWithSpatialPipeline:`](/documentation/PHASE/PHASESpatialMixerDefinition/init(spatialPipeline:))

Creates a mixer with the designated spatial pipeline.

[`-  initWithSpatialPipeline:identifier:`](/documentation/PHASE/PHASESpatialMixerDefinition/init(spatialPipeline:identifier:))

Creates a named mixer with the designated spatial pipeline.

### Setting a Pipeline

[`spatialPipeline`](/documentation/PHASE/PHASESpatialMixerDefinition/spatialPipeline)

An object that adds sound layers for environmental effects.

### Changing Sound Over Distance

[`distanceModelParameters`](/documentation/PHASE/PHASESpatialMixerDefinition/distanceModelParameters)

An effect that changes sound as it carries over a distance.

### Configuring Directivity

[`listenerDirectivityModelParameters`](/documentation/PHASE/PHASESpatialMixerDefinition/listenerDirectivityModelParameters)

A data set that determines how well the listener hears depending on its direction relative to a sound source.

[`sourceDirectivityModelParameters`](/documentation/PHASE/PHASESpatialMixerDefinition/sourceDirectivityModelParameters)

A data set that directs sound such that it’s louder when directed at the listener.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`PHASEMixerDefinition`](/documentation/PHASE/PHASEMixerDefinition)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)