Vixen
02b45cc4
csharp
public static class SpeakerLayout

Where the speakers are, for a given channel count.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Channel order is the one every consumer API agrees on — the WAVE_FORMAT_EXTENSIBLE order, which OpenAL, WASAPI, CoreAudio and every console SDK use: front left, front right, centre, LFE, then the sides, then the backs. Getting it wrong does not sound wrong, it sounds like the room is inside out, and it is the one thing about surround that cannot be debugged by ear without a reference.

The angles are the ITU-R BS.775 arrangement, which is what a domestic system is set up to and what a console's own panner assumes. They are not adjustable: a game that lets a player nudge them is guessing about a room it cannot see, and every platform already exposes a speaker-position setting that its own mixer honours downstream of this.

The LFE is not a direction and is never panned into. It is a band, not a place — the ".1" carries everything below about 120 Hz from the other channels, and a mixer that panned a source into it would put that source's whole spectrum through a subwoofer. What feeds it is a bus with a low-pass on it, which is a mix decision.

Methods (3)

  • public static ReadOnlySpan<float> Angles(int channels)

    The angle of each speaker, in degrees: 0 straight ahead, positive to the right.

  • public static int LowFrequencyChannel(int channels)

    Which channel is the low-frequency effects channel, or −1 if there is none.

  • public static bool IsKnown(int channels)

    Whether a channel count is one this knows how to place a sound in.

Used by (3)

  • LoudnessMeterEffectVixen.Audio
  • SpatializerVixen.Audio
  • SurroundTestsVixen.Audio.Tests