FAudioSpeakerLayout
- Module
- Audio
- Header
#include "Audio/AudioSpeakerLayout.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
uint32_t | ChannelCount | |
const char* | Name | |
ESpeakerLayout | Parse | "stereo", "5.1", "7.1" or "7.1.4"; anything else is stereo. |
ESpeakerLayout | FromChannels | The layout for a channel count the device offers (2, 6 or 8; others fall back to stereo). |
void | Downmix | Folds an interleaved multichannel mix down to stereo with the ITU-R BS.775 coefficients: the centre and the surrounds join at -3 dB, the LFE is dropped. |
void | PanVbap | 2D vector-base amplitude panning: the per-channel gains that place a source at azimuthDegrees (0 straight ahead, +90 right, 180 behind) on the layout's speaker ring. |
void | Upmix | Spreads a stereo mix over a layout: left and right stay in front, the centre carries the mono sum at -3 dB, the surrounds stay empty and the LFE is never fed from a stereo signal. |
Function details
ChannelCount
static uint32_t ChannelCount(ESpeakerLayout layout)Name
static const char* Name(ESpeakerLayout layout)Parse
static ESpeakerLayout Parse(const std::string& name)"stereo", "5.1", "7.1" or "7.1.4"; anything else is stereo.
FromChannels
static ESpeakerLayout FromChannels(uint32_t channels)The layout for a channel count the device offers (2, 6 or 8; others fall back to stereo).
Downmix
static void Downmix(const float* in, uint32_t inChannels, float* outStereo, uint32_t frames)Folds an interleaved multichannel mix down to stereo with the ITU-R BS.775 coefficients: the centre and the surrounds join at -3 dB, the LFE is dropped. A stereo input is copied.
PanVbap
static void PanVbap(ESpeakerLayout layout, float azimuthDegrees, float spread, float* outGains)2D vector-base amplitude panning: the per-channel gains that place a source at azimuthDegrees (0 straight ahead, +90 right, 180 behind) on the layout's speaker ring. The two speakers either side of the direction share it, normalised to unit total power, so a sweep keeps its loudness. spread (0..1) blends toward every speaker equally, the way a wide source fills the room. The LFE and the height channels are never panned. outGains takes ChannelCount(layout) entries.
Upmix
static void Upmix(const float* inStereo, ESpeakerLayout layout, float* out, uint32_t frames)Spreads a stereo mix over a layout: left and right stay in front, the centre carries the mono sum at -3 dB, the surrounds stay empty and the LFE is never fed from a stereo signal.