> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XDspDeactivate

> XDspDeactivate

# XDspDeactivate

Deactivate a stream and return its processing resources that were acquired in [XDspActivate](/reference/audio/xdspaudio/functions/xdspactivate) to the pool.

## Syntax

```cpp theme={null}
HRESULT XDspDeactivate(  
         XDspStreamHandle handle  
)  
```

### Parameters

*handle*   \_In\_\
Type: [XDspStreamHandle](/reference/audio/xdspaudio/handles/xdspstreamhandle)

Handle created by calling [XDspActivate](/reference/audio/xdspaudio/functions/xdspactivate).

### Return value

Type: HRESULT

Returns S\_OK if successful. If the method fails, it returns one of the following codes (partial list):

| Return code               | Description                                                                                                                                                                                                                                 |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| XDSP\_E\_PENDING\_RESULTS | The XDspStream was deactivated before all results from submitted commands were received. Please wait a sufficient amount of time for the hardware to finish processing the submitted commands of the stream before deactivating the stream. |

## Remarks

This call will fail if not all submitted commands are processed.

## Requirements

**Header:** XDspAudio.h

**Library:** Chad.lib

**Supported platforms:** XBOX Series X|S

## Conceptual documentation

* [Overview of a single stream Convolution with Envelope using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution-with-envelope)
* [Overview of a single stream Convolution using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution)
* [XDSP overview](/build/console-features/audio/overviews/xdsp-overview)

## See also

[XDSP](/reference/audio/xdspaudio/xdspaudio_members)\
[XDspActivate](/reference/audio/xdspaudio/functions/xdspactivate)\
[XDSP Errors](/reference/audio/xdspaudio/enums/xdsperrors)\
[Overview of a single stream Convolution using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution)\
[Overview of a single stream FFT/IFFT using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-fft-ifft)\
[Overview of a single stream Convolution with Envelope using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution-with-envelope)


## Related topics

- [XDSP overview](/build/console-features/audio/overviews/xdsp-overview.md)
- [Overview of a single stream Convolution using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution.md)
- [Single-stream convolution with envelope using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution-with-envelope.md)
- [Overview of a single stream FFT/IFFT using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-fft-ifft.md)
- [XDSP audio](/reference/audio/xdspaudio/xdspaudio_members.md)
