<!--
{
  "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/ChannelAudioComponent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation21ChannelAudioComponentV"
  },
  "title" : "ChannelAudioComponent"
}
-->

# ChannelAudioComponent

A component that configures channel-based rendering of sounds from an entity.

```
struct ChannelAudioComponent
```

## Overview

Channel audio sources route the audio resource’s channels directly to the device’s output without any spatialization or reverberation
applied. Neither the position nor orientation of the entity is taken into consideration for channel rendering.
For example,
the left channel is heard from the left,
and the right channel is heard from the right,
regardless of where the user is oriented.

The channels of multichannel audio resources are panned according to their channel layout, including rear channels.

```swift
let entity = Entity()
let resource = try AudioFileResource.load(named: "MyAudioFile")
entity.channelAudio = ChannelAudioComponent()
entity.playAudio(resource)
```

The `ChannelAudioComponent` allows you to set the overall level of all sounds played from the entity with the `gain` property,
in relative Decibels, in the range `-.infinity ... .zero` where `-infinity` is silent and `.zero` is nominal.

```swift
entity.channelAudio?.gain = -10
```

Channel audio sources are well suited to play back sounds not associated with any visual elements in a scene.

---

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)