Audio · class

SourceZoneSend

A source's own routing into one zone's return.

Explained in Your first game.

class SourceZoneSend
import { SourceZoneSend } from '@driftengine/audio';

In depth

A second routing, not a second convolver, which is the whole reason this is affordable: the zone's return already carries a convolver built at registration, and this is one GainNode from the source into that same input. A convolver per source is the general answer to spatial reverb and is priced accordingly — zones.ts has said so since it was written, and this row is what that sentence was waiting for.

Taken before the panner and after the occlusion. A reverb send is taken from the channel on any console, and the return is itself a stereo space: a tail that arrived point-panned would come from the source's direction rather than from the room. Occlusion is upstream on purpose, because a sound behind a wall has a muffled tail too.

Constructor

new

constructor(zone: ReverbZone, gain: GainNode, rampTo: (param: AudioParam, value: number) => void)
ParameterTypeDescription
zoneReverbZone
gainGainNode
rampTo(param: AudioParam, value: number) => void

Properties

NameTypeDescription
zonereadonlyReverbZone

Accessors

NameTypeDescription
valuegetnumberWhat this source is currently sending into that return.

Methods

set

set(value: number): void

Ramped rather than assigned, because a send stepping to a new value is a click.

ParameterTypeDescription
valuenumber

dispose

dispose(): void