<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/AudioMixGroup",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation13AudioMixGroupV"
  },
  "title" : "AudioMixGroup"
}
-->

# AudioMixGroup

A group that manages the playback properties of multiple playing sounds.

```
struct AudioMixGroup
```

## Overview

A mix group component manages the playback parameters for a collection of different
[`AudioPlaybackController`](/documentation/RealityKit/AudioPlaybackController) and [`AudioGeneratorController`](/documentation/RealityKit/AudioGeneratorController) instances.
Properties such as [`gain`](/documentation/RealityKit/AudioMixGroup/gain), [`fade(to:duration:)`](/documentation/RealityKit/AudioMixGroup/fade(to:duration:)), and [`speed`](/documentation/RealityKit/AudioMixGroup/speed)
are multiplicative with the parameters you set on the controller.

You  associate audio resources to a mix group by setting the `mixGroupName` parameter in the resource’s configuration.
For an example, see [`mixGroupName`](/documentation/RealityKit/AudioFileResource/Configuration-swift.struct/mixGroupName).
Enable a mix group by adding it to an [`AudioMixGroupsComponent`](/documentation/RealityKit/AudioMixGroupsComponent) structure on an entity in the scene.
The scene where the component belongs limits the scope of the mix group.

```swift
var mixGroup = AudioMixGroup(name: "myMixGroup")
entity.components.set(AudioMixGroupsComponent(mixGroups: [mixGroup]))
```

## Topics

### Initializers

[`init(name: String)`](/documentation/RealityKit/AudioMixGroup/init(name:))

Creates a mix group.

### Instance Properties

[`var gain: Audio.Decibel`](/documentation/RealityKit/AudioMixGroup/gain)

The overall level for all sounds of an audio mix group in relative decibels.

[`var isMuted: Bool`](/documentation/RealityKit/AudioMixGroup/isMuted)

A Boolean value that indicates whether an audio mix group emits any sound.

[`let name: String`](/documentation/RealityKit/AudioMixGroup/name)

The name of an audio mix group.

[`var speed: Double`](/documentation/RealityKit/AudioMixGroup/speed)

The rate of playback for an audio mix group.

### Instance Methods

[`func fade(to: Audio.Decibel, duration: TimeInterval)`](/documentation/RealityKit/AudioMixGroup/fade(to:duration:))

Transitions the gain to a value over a time interval using a linear curve.

## Relationships

### Conforms To

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

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

---

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)