XApuConnectInputParameters
傳遞給 XApuConnect 以配置資源的參數。語法
成員
processType類型:XApuProcessType 將對 XAPU 用戶端處理的所有串流執行的處理類型。單一用戶端無法執行一種以上的處理類型。 maxStreamCount
類型:uint32_t 預期可同時為 XAPU 用戶端啟用的串流數目上限。最小值為 1,最大值為 500 maxQueuedCommandsPerStream
類型:uint32_t 單一串流的命令佇列大小。最小值為 1,最大值為 16。XAPU 用戶端的命令佇列總大小為 maxStreamCount * maxQueuedCommandsPerStream baseDataLength
類型:uint32_t 處理 maxStreamCount 個串流所需的記憶體配置 (以位元組為單位),其中包含輸入、輸出和處理緩衝區。 例如,對於一個使用 20 毫秒封包 (960 個框架) 的立體聲 Opus 串流,DecodeOpus 情況下的 baseDataLength 可以是 預期輸入封包長度上限 (以位元組為單位) 加上輸出框架數目乘以通道數目再乘以 float 變數大小。 對於 XApuProcessType::DecodeOpus,一般公式為: baseDataLength = maxStreamCount x maxQueuedCommandsPerStream x (MaxOpusPacketInBytes + (MaxFrameCountPerPacket x ChannelCount x sizeof(float)) 其中 MaxFrameCountPerPacket 應為 16 的倍數 對於 XApuProcessType::DecodeConvertOpus,一般公式為: baseDataLength = (maxStreamCount x maxQueuedCommandsPerStream x (MaxOpusPacketInBytes + (MaxFrameCountPerPacket x ChannelCount x sizeof(float)))
- (maxStreamCount x XApuDecodeConvertActivateCommand::processingBufferLength) 其中 MaxFrameCountPerPacket 應為 16 的倍數
類型:uint32_t 當 XAPU 以 XApuProcessType::ConvertPCM 或 XApuProcessType::DecodeConvertOpus 類型執行時,此參數會以框架數目定義輸出持續時間。 對於 XApuProcessType::ConvertPCM 或 XApuProcessType::DecodeConvertOpus,此參數必須設定為下列其中一個值:256、480、512、960、1024。 對於 XApuProcessType::DecodeOpus,此參數必須設定為零 options
類型:XApuConnectOptions 連線選項。
備註
由XApuConnectInputParameters 用來將參數傳遞給 XApuConnect。XApuConnect 會為音訊處理單元 (XAPU) 配置必要的資源。XApuCommandId 定義要傳送至 XAPU 及從 XAPU 接收的基本命令參數。
需求
標頭: xapu.h 支援的平台: XBOX Series X|S另請參閱
XApuCommandIdXApuConnect
XApuDecodeConvertCommand
XAPU
