XApuDecodeConvertActivateCommand
Defines decode or decode-convert activation parametersSyntax
Members
idType: XApuCommandId Specifies the base command parameters to be sent to the hardware for processing. The same XApuCommandId will be set to XApuResult::id. channelCount
Type: uint32_t Specifies the stream channel count. Only 1 and 2 are supported for mono and stereo respectively. initializeDataLength
Type: uint32_t Not used and should be set to zero. initializeData
Type: void* Not used and should be set to NULL. startPitch
Type: float Start pitch if converter is active. In the decode only case, this value is ignored. processingBufferLength
Type: uint32_t Length of XApuDecodeConvertActivateCommand::processingBuffer in bytes. Must be a multiple of 16 in length. processingBuffer
Type: void* Intermediate buffer to store uncompressed PCM float (32-bit) data for XApuProcessType::DecodeConvertOpus and XApuProcessType::ConvertPCM types The processing buffer is carved out of XApuConnectOutputParameters::baseData and passed to XAPU through the XApuCommandType::Activate command using XApuDecodeConvertActivateCommand::processingBuffer and XApuDecodeConvertActivateCommand::processingBufferLength arguments The processing buffer is necessary to store the intermediate PCM float (32-bit) data from the decoder that is not converted yet for the XApuProcessType::DecodeConvertOpus case. For the XApuProcessType::ConvertPCM case, it will store the PCM float data from the caller that is not converted yet. This buffer must be 16-byte aligned. Also it stores converted data that is not ready to be out yet for both XApuProcessType::DecodeConvertOpus and XApuProcessType::ConvertPCM types. XAPU internally divides the processing buffer into two segments; an input segment for unconverted input PCM data, and an output segement for the converted output PCM data. The length of the input segment should always be twice the length of the Opus packet duration i.e. (2 x 960 x ChannelCount x sizeof(float)) The output segment is used to store the converted data when it is less than 512 XApuConnectInputParameters::maxFrameCountPerOutput The output segment will not be used when XApuCommandOptions::Flush is set since XAPU will output the data even if it is less than XApuConnectInputParameters::maxFrameCountPerOutput frames. The length of the output segment is XApuConnectInputParameters::maxFrameCountPerOutput x ChannelCount x sizeof(float) XApuDecodeConvertActivateCommand::processingBufferLength is a constant number per stream and works for all pitch values from 1/8 to 8/1 and should be set as follows: ProcessingBufferLength = (2 x 960 x ChannelCount x sizeof(float)) + (XApuConnectInputParameters::maxFrameCountPerOutput x ChannelCount x sizeof(float))
ChannelCount = 1 or 2 XApuConnectInputParameters::maxFrameCountPerOutput = 256, 480, 512, 960 or 1024.
Remarks
Used byXApuDecodeConvertActivateCommand to decode and convert activation parameters. For information about the XApuCommandId members, see XApuCommandId. For information about the XApuProcessType constants, see XApuProcessType.
Requirements
Header: xapu.h Supported platforms: XBOX Series X|SSee also
XApuEnqueueCommandXAPU
