One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

Audio.Scattering

struct · iOS 27.0+ · SDK 27.1

struct Scattering

An object that holds a set of scattering data. The scattering coefficient is a value between zero and one that describes the proportion of incident sound energy that is diffused or redirected by a surface, rather than absorbed. Create scattering data from an array of ten octave-band coefficients, a dictionary of frequency–coefficient pairs, or a dictionary literal: ```swift // From an array of ten octave-band coefficients: let data = Audio.Scattering([0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10]) // From a dictionary of frequency–coefficient pairs: let data = Audio.Scattering([500: 0.3, 1000: 0.4, 4000: 0.5]) // From a dictionary literal: let data: Audio.Scattering = [500: 0.3, 1000: 0.4, 4000: 0.5] ```

Members (4)

get · iOS 27.0+

default

TypeScript
static get default(): Audio_Scattering
Swift declaration
static let `default`: Audio.Scattering

The default set of scattering data.

static · iOS 27.0+

uniform

TypeScript
static uniform(coefficient: number): Audio_Scattering
Swift declaration
static func uniform(_ coefficient: Float) -> Audio.Scattering

Creates a scattering data set with the coefficient applied uniformly for every frequency. - Parameter coefficient: The scattering coefficient to apply across all frequency bands.

init · iOS 27.0+

init

TypeScript
static init(coefficientByFrequency: Record<number, number>): Audio_Scattering
Swift declaration
init(_ coefficientByFrequency: [Float : Float])

Creates a scattering data set from a sequence of pairs of center frequency and scattering coefficient. The scattering coefficient is a value between zero and one that describes the proportion of incident sound energy that is diffused or redirected by a surface, rather than absorbed. The values will be interpolated and/or extrapolated to cover the audible frequency range. let data = Audio.Scattering([500: 0.3, 1000: 0.4, 4000: 0.5])

init · iOS 27.0+

init

TypeScript
static init90326(coefficients: Array<number>): Audio_Scattering
Swift declaration
init(_ coefficients: [Float])

Creates a scattering data set from an array of ten octave-band scattering coefficients. The scattering coefficient is a value between zero and one that describes the proportion of incident sound energy that is diffused or redirected by a surface, rather than absorbed. Values below zero will be reset to zero, and values above one will be reset to one. The coefficients provided correspond to the following center frequencies: 31.5Hz, 63Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz, 16kHz Example usage: let data = Audio.Scattering([0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10]) - Precondition: Ten elements are provided.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

Audio.Scattering.scaled(by:)

callback cannot propagate synchronous failure

Audio.Scattering.init(dictionaryLiteral:)

A variable number of Swift arguments is not supported.

All RealityFoundation types →