XAudio2 Boundary Values and Flags

XAudio2 constants that specify default parameters, maximum values, and flags.

XAudio2 boundary values

Constant Description
XAUDIO2_MAX_BUFFER_BYTES
Maximum value allowed for XAUDIO2_BUFFER.AudioBytes.
XAUDIO2_MAX_QUEUED_BUFFERS
Maximum buffers allowed in a voice queue.
XAUDIO2_MAX_BUFFERS_SYSTEM
Maximum buffers allowed for system threads (Xbox 360 only).
XAUDIO2_MAX_AUDIO_CHANNELS
Maximum value allowed for WAVEFORMATEX.nChannels.
XAUDIO2_MIN_SAMPLE_RATE
Minimum audio sample rate supported.
XAUDIO2_MAX_SAMPLE_RATE
Maximum audio sample rate supported.
XAUDIO2_MAX_VOLUME_LEVEL
Maximum allowed volume level.
XAUDIO2_MIN_FREQ_RATIO
Minimum frequency ratio allowed in a source voice.
XAUDIO2_MAX_FREQ_RATIO
Maximum frequency ratio allowed in a source voice.
XAUDIO2_DEFAULT_FREQ_RATIO
Default value for the MaxFrequencyRatio argument of IXAudio2::CreateSourceVoice.
XAUDIO2_MAX_FILTER_ONEOVERQ
Maximum value for XAUDIO2_FILTER_PARAMETERS.OneOverQ.
XAUDIO2_MAX_FILTER_FREQUENCY
Maximum value for XAUDIO2_FILTER_PARAMETERS.Frequency.
XAUDIO2_MAX_LOOP_COUNT
Maximum value that will not be treated as infinite looping for XAUDIO2_BUFFER.LoopCount.
XAUDIO2_MAX_INSTANCES
Maximum simultaneous instances of XAudio2 allowed on Xbox 360.

XAudio2 values with special meaning

Constant Description
XAUDIO2_COMMIT_NOW
Used as a parameter to methods with an OperationSet argument. See XAudio2 Operation Sets for more information.
XAUDIO2_COMMIT_ALL
Used as a parameter in IXAudio2::CommitChanges.
XAUDIO2_INVALID_OPSET
Specifies an invalid value for OperationSet arguments. See XAudio2 Operation Sets for more information.
XAUDIO2_NO_LOOP_REGION
Specifies no loop region, used in XAUDIO2_BUFFER.LoopCount.
XAUDIO2_LOOP_INFINITE
Specifies infinite looping, used in XAUDIO2_BUFFER.LoopCount.
XAUDIO2_DEFAULT_CHANNELS
Specifies the default number of channels for the current platform, used in IXAudio2::CreateMasteringVoice.
XAUDIO2_DEFAULT_SAMPLERATE
Specifies the default sample rate for the current platform, used in IXAudio2::CreateMasteringVoice.

XAudio2 Flags

Constant Description
XAUDIO2_DEBUG_ENGINE
Specifies that the debug/checked version of the audio engine should be used instead of the release version. See XAudio2Create.
Note: This flag is not supported on Windows 8 or Windows 10.
XAUDIO2_VOICE_NOPITCH
Specifies that a source voice will not use pitch shifting, see IXAudio2::CreateSourceVoice.
XAUDIO2_VOICE_NOSRC
Specifies that no sample rate conversion is available on a source voice, the voice's outputs must have the same sample rate. See IXAudio2::CreateSourceVoice.
XAUDIO2_VOICE_USEFILTER
Specifies that the filter effect should be available on a voice. See IXAudio2::CreateSourceVoice and IXAudio2::CreateSubmixVoice.
XAUDIO2_PLAY_TAILS
Specifies that a voice should continue emitting effect output after it is stopped. See IXAudio2SourceVoice::Stop.
XAUDIO2_END_OF_STREAM
Indicates the last buffer in a stream. See XAUDIO2_BUFFER.Flags.
XAUDIO2_STOP_ENGINE_WHEN_IDLE
Specifies that the audio engine should stop when no source voices are started and start when a voice is started. See XAudio2Create.
XAUDIO2_SEND_USEFILTER
Indicates a filter should be used on a voice send. See XAUDIO2_SEND_DESCRIPTOR.Flags.
XAUDIO2_1024_QUANTUM
Specifies a non-default processing quantum of 21.33 ms (1024 samples at 48KHz). See XAudio2Create.
XAUDIO2_NO_VIRTUAL_AUDIO_CLIENT
Specifies that a virtual audio client should not be used. See IXAudio2::CreateMasteringVoice.
Note: On devices in the Mobile device family, a virtual audio client is always used, regardless of whether this flag is used.

XAudio2 Default Parameters for the Built-in Voice Filter

Constant Description
XAUDIO2_DEFAULT_FILTER_TYPE
Specifies the default filter type to be used with voices and voice sends.
XAUDIO2_DEFAULT_FILTER_FREQUENCY
Specifies the default filter frequency to be used with voices and voice sends.
XAUDIO2_DEFAULT_FILTER_ONEOVERQ
Specifies the default filter rate of decay to be used with voices and voice sends.

Remarks

Platform Requirements

Windows 10 (XAudio2.9); Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)

Requirements

Requirement Value
Header
Xaudio2.h

See also

XAudio2::Constants