Ambisonics Decode Effect

Typedefs

typedef struct _IPLAmbisonicsDecodeEffect_t *IPLAmbisonicsDecodeEffect

Applies a rotation to an Ambisonics audio buffer, then decodes it using panning or binaural rendering.

This is essentially an Ambisonics rotate effect followed by either an Ambisonics panning effect or an Ambisonics binaural effect.

Functions

IPLerror iplAmbisonicsDecodeEffectCreate(IPLContext context, IPLAudioSettings *audioSettings, IPLAmbisonicsDecodeEffectSettings *effectSettings, IPLAmbisonicsDecodeEffect *effect)

Creates an Ambisonics rotation effect.

Parameters
  • context – The context used to initialize Steam Audio.

  • audioSettings – Global audio processing settings.

  • effectSettings – The settings to use when creating the Ambisonics rotation effect.

  • effect – [out] The created Ambisonics rotation effect.

Returns

Status code indicating whether or not the operation succeeded.

IPLAmbisonicsDecodeEffect iplAmbisonicsDecodeEffectRetain(IPLAmbisonicsDecodeEffect effect)

Retains an additional reference to an Ambisonics rotation effect.

Parameters

effect – The Ambisonics rotation effect to retain a reference to.

Returns

The additional reference to the Ambisonics rotation effect.

void iplAmbisonicsDecodeEffectRelease(IPLAmbisonicsDecodeEffect *effect)

Releases a reference to an Ambisonics rotation effect.

Parameters

effect – The Ambisonics rotation effect to release a reference to.

void iplAmbisonicsDecodeEffectReset(IPLAmbisonicsDecodeEffect effect)

Resets the internal processing state of an Ambisonics rotation effect.

Parameters

effect – The Ambisonics rotation effect to reset.

IPLAudioEffectState iplAmbisonicsDecodeEffectApply(IPLAmbisonicsDecodeEffect effect, IPLAmbisonicsDecodeEffectParams *params, IPLAudioBuffer *in, IPLAudioBuffer *out)

Applies an Ambisonics decode effect to an audio buffer.

This effect CANNOT be applied in-place.

Parameters
  • effect – The Ambisonics decode effect to apply.

  • params – Parameters for applying the effect.

  • in – The input audio buffer. Must have as many channels as needed for the Ambisonics order specified when creating the effect.

  • out – The output audio buffer. Must have as many channels as needed for the speaker layout specified when creating the effect (if using panning) or 2 channels (if using binaural rendering).

Returns

IPL_AUDIOEFFECTSTATE_TAILREMAINING if any tail samples remain in the effect’s internal buffers, or IPL_AUDIOEFFECTSTATE_TAILCOMPLETE otherwise.

Structures

struct IPLAmbisonicsDecodeEffectSettings

Settings used to create an Ambisonics decode effect.

Public Members

IPLSpeakerLayout speakerLayout

The speaker layout that will be used by output audio buffers.

IPLHRTF hrtf

The HRTF to use.

IPLint32 maxOrder

The maximum Ambisonics order that will be used by input audio buffers.

struct IPLAmbisonicsDecodeEffectParams

Parameters for applying an Ambisonics decode effect to an audio buffer.

Public Members

IPLint32 order

Ambisonic order of the input buffer.

May be less than the maxOrder specified when creating the effect, in which case the effect will process fewer input channels, reducing CPU usage.

IPLHRTF hrtf

The HRTF to use.

IPLCoordinateSpace3 orientation

The orientation of the listener.

IPLbool binaural

Whether to use binaural rendering or panning.