How do I mix audio?
Asked on 07/31/2024
1 search
To mix audio in your app, you can use the audio mixer functionality provided by RealityKit. Here's a step-by-step guide based on the session "Enhance your spatial computing app with RealityKit audio":
-
Load Audio Resources: Start by loading your audio resources. For example, you can load a music audio resource and set its mix group name property to "music". This will be the name of the mix group that you will adjust in the audio mixer.
-
Create an Entity: Create an entity that will hold an audio mix groups component. When the level is updated for your mix group, you will create the audio mix group and set its gain.
-
Construct the Audio Mix Groups Component: Construct the audio mix groups component and set it on the audio mixer entity. You can update the audio mix groups component with updates to the UI.
-
Control Levels: Use the audio mixer to individually control the levels of each category of audio. For example, you can turn down the music, pull down the planet tones, and adjust the spaceship sounds to create the perfect mix.
For a detailed walkthrough, you can refer to the session Enhance your spatial computing app with RealityKit audio (20:41).
Relevant Sessions
- Enhance your spatial computing app with RealityKit audio
- Compose interactive 3D content in Reality Composer Pro
If you need more specific details or code examples, please let me know!

Compose interactive 3D content in Reality Composer Pro
Discover how the Timeline view in Reality Composer Pro can bring your 3D content to life. Learn how to create an animated story in which characters and objects interact with each other and the world around them using inverse kinematics, blend shapes, and skeletal poses. We’ll also show you how to use built-in and custom actions, sequence your actions, apply triggers, and implement natural movements.

Enhance your spatial computing app with RealityKit audio
Elevate your spatial computing experience using RealityKit audio. Discover how spatial audio can make your 3D immersive experiences come to life. From ambient audio, reverb, to real-time procedural audio that can add character to your 3D content, learn how RealityKit audio APIs can help make your app more engaging.

Support real-time ML inference on the CPU
Discover how you can use BNNSGraph to accelerate the execution of your machine learning model on the CPU. We will show you how to use BNNSGraph to compile and execute a machine learning model on the CPU and share how it provides real-time guarantees such as no runtime memory allocation and single-threaded running for audio or signal processing models.