Audio
Create personalized and realistic spatial audio experiences.
Overview
Creating a compelling audio experience with RealityKit is as simple as playing audio on your existing RealityKit entities. Use RealityKit’s default audio settings to create a personalized and realistic experience or utilize advanced customization options to tailor the audio for the needs of your application. Utilizing acoustic ray tracing and a personalized HRTF, RealityKit provides lifelike and high-quality sound.
You can load and configure audio with an AudioResource subclass, such as AudioFileResource, and adjust the spatial rendering with SpatialAudioComponent, AmbientAudioComponent, ChannelAudioComponent. Control the audio resource playback with AudioPlaybackController. For real-time audio playback you can prepare a Audio.GeneratorRenderHandler and control playback with AudioGeneratorController. You can control the playback levels of multiple resources at once with AudioMixGroup and AudioMixGroupsComponent.
Topics
Audio source components
Creating a Spaceship gamePlaying spatial audioSpatialAudioComponentAmbientAudioComponentChannelAudioComponent
Playback controllers
AudioPlaybackControllerAudioGeneratorControllerAudioGeneratorConfigurationAudioEventsPlayAudioAction
Audio resources
AudioFileResourceAudioFileGroupResourceAudioBufferResourceAudioLibraryComponentAudioResourceAudioResource.CalibrationAudioResource.Normalization
Reverb
Audio mixing
Audio types
See Also
Scene content
Hello WorldEnabling video reflections in an immersive environmentCreating a spatial drawing app with RealityKitGenerating interactive geometry with RealityKitCombining 2D and 3D views in an immersive appTransforming RealityKit entities using gesturesResponding to gestures on an entityModels and meshesMaterials, textures, and shadersAnchorsLights and camerasContent synchronizationVideosImages