Skip to main content

XDspActivate

Activate XDSP stream by acquiring a free processing resource from the pool. Each XDSP client is limited to 256 stream activations.

Syntax

Parameters

clientHandle   _In_
Type: XDspClientHandle
A valid XDSP client handle obtained from the call to XDspConnect. params   _In_
Type: XDspActivationParameters*
Pointer to an XDspActivationParameters structure. status   _Outptr_
Type: XDspStatus**
Pointer to an XDspStatus structure. See the Remarks section for additional details. streamHandle   _Outptr_
Type: XDspStreamHandle*
Valid XDspStreamHandle, if the call succeeds. See the Remarks section for additional details.

Return value

Type: HRESULT If the method succeeds, it returns S_OK. If the method fails, it returns one of the following codes (partial list):

Remarks

This call is quick as it acquires resources from the pool instead of allocating them. The caller must specify an XDspProcessType for the XDSP stream to perform. An instance of XDSP stream can work with one processing type only during its lifetime. To perform two or more different processing types, two or more XDSP stream instances must be instantiated. Inside the XDspActivationParameters structure, the caller must specify the following:
  • Activation options.
  • Number of frames that will be processed in each command, i.e. the input and output number of frames.
  • Number of channels of the stream. Only mono and stereo input streams are supported.
  • For XDspProcessType::Convolution processing type, the length of the impulse response in floats.
  • For XDspProcessType::Convolution processing type, the impulse response as frequency domain values.
If the call succeeds, a valid XDspStreamHandle will be returned to be used with other calls (XDspSubmitCommand, XDspSubmitCommandWithEnvelope, XDspDeactivate) for this stream. Also, if this call succeeds it will return a pointer to XDspStatus that can be used to check the status of the submitted commands. This should be used to determine the latest command that has been processed and whether the results from the submitted commands are ready to be consumed. XDspStatus also has the sequence number of the last command that was submitted to the hardware and the sequence number of the first failed command for the XDSP stream that it represents. In case of convolution processing, the caller may free the impulse response memory after this call returns.

Requirements

Header: XDspAudio.h Library: Chad.lib Supported platforms: XBOX Series X|S

Conceptual documentation

See also

XDSP
XDSP Errors
Overview of a single stream Convolution using the XDSP API
Overview of a single stream FFT/IFFT using the XDSP API
Overview of a single stream Convolution with Envelope using the XDSP API
Last modified on August 20, 2026