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

# XDspDeactivate

> XDspDeactivate

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

## Syntax

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

### Parameters

*handle*   \_In\_\
Type: [XDspStreamHandle](https://docs.xbox.com/reference/audio/xdspaudio/handles/xdspstreamhandle.md)

Handle created by calling [XDspActivate](https://docs.xbox.com/reference/audio/xdspaudio/functions/xdspactivate.md).

### 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](https://docs.xbox.com/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution-with-envelope.md)
* [Overview of a single stream Convolution using the XDSP API](https://docs.xbox.com/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution.md)
* [XDSP overview](https://docs.xbox.com/build/console-features/audio/overviews/xdsp-overview.md)

## See also

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


## Related topics

- [XDspStreamHandle](https://docs.xbox.com/reference/audio/xdspaudio/handles/xdspstreamhandle.md)
- [XDSP overview](https://docs.xbox.com/build/console-features/audio/overviews/xdsp-overview.md)
- [Overview of a single stream Convolution using the XDSP API](https://docs.xbox.com/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution.md)
- [Single-stream convolution with envelope using the XDSP API](https://docs.xbox.com/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution-with-envelope.md)
- [Overview of a single stream FFT/IFFT using the XDSP API](https://docs.xbox.com/build/console-features/audio/overviews/xdsp-overview-single-stream-fft-ifft.md)
