> ## 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.

# XApuConnectInputParameters

> XApuConnectInputParameters

# XApuConnectInputParameters

Parameters passed to [XApuConnect](/reference/audio/xapu/functions/xapuconnect) to allocated resources.

## Syntax

```cpp theme={null}
typedef struct XApuConnectInputParameters {  
    XApuProcessType processType;  
    uint32_t maxStreamCount;  
    uint32_t maxQueuedCommandsPerStream;  
    uint32_t baseDataLength;  
    uint32_t maxFrameCountPerOutput;  
    XApuConnectOptions options;  
} XApuConnectInputParameters  
```

### Members

*processType*\
Type: [XApuProcessType](/reference/audio/xapu/enums/xapuprocesstype)

Process type that will be performed for all the streams processed by the XAPU client. A single client cannot perform more than one process type.

*maxStreamCount*\
Type: uint32\_t

Maximum number of streams that is expected to be activated for the XAPU client simultaneously. Min value is 1, max is 500

*maxQueuedCommandsPerStream*\
Type: uint32\_t

Command queue size for one stream. Min value is 1, max is 16. Total command queue size for the XAPU client is *maxStreamCount* \* *maxQueuedCommandsPerStream*

*baseDataLength*\
Type: uint32\_t

The required memory allocation in bytes to process *maxStreamCount* streams which includes the input, output, and processing buffers.
For example, *baseDataLength* for DecodeOpus case of one stereo Opus stream with 20 milliseconds packets (960 frames) can be
maximum expected input packet length in bytes plus output frame count times number of channels times size of float variable.

For XApuProcessType::DecodeOpus the general formula is:

baseDataLength = maxStreamCount x maxQueuedCommandsPerStream x (MaxOpusPacketInBytes + (MaxFrameCountPerPacket x ChannelCount x sizeof(float))
where *MaxFrameCountPerPacket* should be multiple of 16

For [XApuProcessType::DecodeConvertOpus](/reference/audio/xapu/enums/xapuprocesstype) the general formula is:
baseDataLength = (maxStreamCount x maxQueuedCommandsPerStream x (MaxOpusPacketInBytes + (MaxFrameCountPerPacket x ChannelCount x sizeof(float)))

* (maxStreamCount x XApuDecodeConvertActivateCommand::processingBufferLength)
  where *MaxFrameCountPerPacket* should be multiple of 16

*maxFrameCountPerOutput*\
Type: uint32\_t

This parameter defines the output duration in frame count when XAPU is running in [XApuProcessType::ConvertPCM](/reference/audio/xapu/enums/xapuprocesstype) or [XApuProcessType::DecodeConvertOpus](/reference/audio/xapu/enums/xapuprocesstype) types.
For [XApuProcessType::ConvertPCM](/reference/audio/xapu/enums/xapuprocesstype) or [XApuProcessType::DecodeConvertOpus](/reference/audio/xapu/enums/xapuprocesstype), this parameter must be set to one of the following values: 256, 480, 512, 960, 1024.
This parameter must be set to zero for [XApuProcessType::DecodeOpus](/reference/audio/xapu/enums/xapuprocesstype)

*options*\
Type: [XApuConnectOptions](/reference/audio/xapu/enums/xapuconnectoptions)

Connect options.

## Remarks

Used by `XApuConnectInputParameters` to pass parameters to `XApuConnect`. `XApuConnect` allocates the necessary resources for an Audio Processing Unit (XAPU). `XApuCommandId` defines the base command parameter to be sent and received from the XAPU.

## Requirements

**Header:** xapu.h

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

## See also

[XApuCommandId](/reference/audio/xapu/structs/xapucommandid)\
[XApuConnect](/reference/audio/xapu/functions/xapuconnect)\
[XApuDecodeConvertCommand](/reference/audio/xapu/structs/xapudecodeconvertcommand)\
[XAPU](/reference/audio/xapu/xapu_members)


## Related topics

- [XApuConnect](/reference/audio/xapu/functions/xapuconnect.md)
- [XApuConnectOptions](/reference/audio/xapu/enums/xapuconnectoptions.md)
- [XApuProcessType](/reference/audio/xapu/enums/xapuprocesstype.md)
- [XApuDecodeConvertActivateCommand](/reference/audio/xapu/structs/xapudecodeconvertactivatecommand.md)
- [XApuDecodeConvertCommand](/reference/audio/xapu/structs/xapudecodeconvertcommand.md)
