---
title: PHASEMixerDefinition
framework: phase
role: symbol
role_heading: Class
path: phase/phasemixerdefinition
---

# PHASEMixerDefinition

An object to initialize a mixer with a given configuration.

## Declaration

```swift
class PHASEMixerDefinition
```

## Overview

Overview A mixer combines multiple layers of audio to a single signal for transmission to the output device. The framework creates a mixer when you provide a mixer definition. Instead of creating an instance of this class, instantiate one of the mixer definition subclasses instead: Play a Sound Using a Mixer To play a sound using a mixer, create a mixer definition and pass it to a sound event. The following code creates a PHASEChannelMixerDefinition and passes it into a node definition the app can invoke to play the channel-based audio file drumloopSoundAsset: // Create a channel mixer definition. let stereoMixer = PHASEChannelMixerDefinition(channelLayout:stereoLayout!)

// Pass the mixer to a sound event node definition that plays an audio file. let drumloopSamplerNode = PHASESamplerNodeDefinition(soundAssetIdentifier:drumloopSoundAsset.identifier, mixerDefinition:stereoMixer, identifier:"drumloopNode")

## Topics

### Controlling Volume

- [gain](phase/phasemixerdefinition/gain.md)
- [gainMetaParameterDefinition](phase/phasemixerdefinition/gainmetaparameterdefinition.md)

## Relationships

### Inherits From

- [PHASEDefinition](phase/phasedefinition.md)

### Inherited By

- [PHASEAmbientMixerDefinition](phase/phaseambientmixerdefinition.md)
- [PHASEChannelMixerDefinition](phase/phasechannelmixerdefinition.md)
- [PHASESpatialMixerDefinition](phase/phasespatialmixerdefinition.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Audio Layering and Effects

- [PHASEChannelMixerDefinition](phase/phasechannelmixerdefinition.md)
- [PHASEAmbientMixerDefinition](phase/phaseambientmixerdefinition.md)
- [PHASEMixer](phase/phasemixer.md)
- [PHASEDefinition](phase/phasedefinition.md)
- [Spatial Mixing](phase/spatial-mixing.md)
