Audio · function
foaDecodeMatrix
The decode matrix: four coefficients per speaker, in ACN order, ready to be uploaded as gains.
Explained in Your first game.
function foaDecodeMatrix(speakers?: readonly (readonly [number, number, number])[]): Float32Arrayimport { foaDecodeMatrix } from '@driftengine/audio';Parameters
| Parameter | Type | Description |
|---|---|---|
speakers? | readonly (readonly [number, number, number])[] |
In depth
Built once, because it never changes. The speakers are world-fixed and the head's rotation is
the AudioListener's to apply, so there is nothing here that depends on where anybody is looking
— which is what makes a soundfield cost a fixed number of nodes rather than a fixed number of
per-frame parameter writes.