XAPOFX Overview

XAPOFX is a collection of audio effects implementing the XAPO interfaces for use in XAudio2. XAPOFX contains several effects, and a common mechanism for creating effect instances.

Included Effects

The following table describes the effects included in XAPOFX.

EffectDescriptionParameter StructureParameter ConstantsRequirements
FXECHOAn echo effect. FXECHO_PARAMETERS FXECHO Constants Only supports FLOAT32 audio formats.
FXEQA four band equalizer. FXEQ_PARAMETERS FXEQ Constants Only supports FLOAT32 audio formats. The sample rate must be between 22,000 Hz and 48,000 Hz.
FXMasteringLimiterA volume limiter. FXMASTERINGLIMITER_PARAMETERS FXMASTERINGLIMIT Constants Only supports FLOAT32 audio formats.
FXReverb

A simple reverb effect.

XAudio2 also provides an effect implementing Princeton Digital Reverb that can be instantiated with XAudio2CreateReverb.

FXREVERB_PARAMETERS FXREVERB Constants Only supports FLOAT32 audio formats. Also, it only supports mono input to mono output, and stereo input to stereo output.

 

Creating an Instance of an Effect Included in XAPOFX

XAPOFX provides the CreateFX function as a common mechanism for creating effect instances. CreateFX takes the CLSID of an effect, and returns an IUnknown interface pointer to an instance of the effect.

Using XAPOFX in XAudio2

Effects instantiated with CreateFX are used in XAudio2 by attaching them to voices. Each XAudio2 voice has an effect chain containing zero or more audio effects. Audio data sent to a voice is passed through each effect in the chain before it is sent to the voice's output targets. The voice takes the output of each effect, and feeds it into the next effect in the chain until no effects are left in the chain. To attach an XAPOFX effect to an XAudio2 voice, fill out an XAUDIO2_EFFECT_CHAIN structure with the effect's information, and pass it to IXAudio2Voice::SetEffectChain.

For more information about XAudio2 effect chains, see XAudio2 Audio Effects.

For an example of using XAPOFX in XAudio2, see How to: Use XAPOFX in XAudio2.

XAudio2 Implicit Effects

In addition to the library of XAPOs provided by XAPOFX, XAudio2 has built-in reverb and volume meter audio effects. You can create these built-in effects with XAudio2CreateReverb and XAudio2CreateVolumeMeter. See How to: Create an Effect Chain for an example of using one of these built-in effects.

Related topics

Audio Effects

 

 

Show: