Skip to main content

SHAPE_XMA_CONTEXT

XBOX 媒体音频 (XMA) 上下文。

Syntax

Members

sizeRead0
Type: UINT32
Write:左输入缓冲区的大小,以 2 KB 为块单位。 numLoops
Type: UINT32
Read/Write:循环数量。255 表示无限(连续)循环。 validBuffer
Type: UINT32
Read/Write:输入缓冲区的有效性标志。 sizeWrite
Type: UINT32
Write:输出缓冲区的大小,以 256 字节为块单位。 offsetWrite
Type: UINT32
Read:硬件在输出缓冲区中将要写入位置的偏移量,以 256 字节为块单位。 sizeRead1
Type: UINT32
Write:右输入缓冲区的大小,以 2 KB 为块单位。 loopSubframeEnd
Type: UINT32
Write:循环端点的子帧编号(包含该子帧)。 reserved0
Type: UINT32
保留。 loopSubframeSkip
Type: UINT32
Write:在循环开始处要跳过的子帧数量。有效值为 0、1、2、3 和 4。 numSubframesToDecode
Type: UINT32
Write:每次运行要解码的子帧数量。有效值为 1、2、4 和 8。 numSubframesToSkip
Type: UINT32
Write:要跳过的子帧数量。有效值为 0、1、2、3 和 4。 sampleRate
Type: UINT32
Write:流的采样率。有效值位于 SHAPE_XMA_SAMPLE_RATE 枚举中。 numChannels
Type: UINT32
Write:流中的通道数。0 表示单声道(一个通道);1 表示立体声(两个通道)。 reserved1
Type: UINT32
保留。 validWrite
Type: UINT32
Read/Write:写入缓冲区的有效性标志。1 表示硬件可以写入;0 表示硬件不能写入。 offsetRead
Type: UINT32
Read/Write:自输入缓冲区起始位置的偏移量,以位为单位。 errorStatus
Type: UINT32
Read:一个或多个错误值。 errorSet
Type: UINT32
Read:错误标志。0 表示未发生错误;1 表示发生了错误。使用 GetShapeXmaErrorStatus 检索错误值。 loopStartOffset
Type: UINT32
Write:自读取缓冲区指针起、硬件开始解码位置的偏移量,以位为单位。 parserErrorStatus
Type: UINT32
Read:解析器错误值。 parserErrorSet
Type: UINT32
Read:解析器错误标志。0 表示未发生错误;1 表示发生了错误。使用 GetShapeXmaParserErrorStatus 检索错误值。 loopEndOffset
Type: UINT32
Write:自读取缓冲区指针起、硬件结束解码位置的偏移量,以位为单位。 packetMetaData
Type: UINT32
保留供内部使用。 currentBuffer
Type: UINT32
Read/Write:当前输入缓冲区。0 表示左缓冲区,1 表示右缓冲区。 ptrRead0
Type: UINT32
Write:指向左输入缓冲区的指针。按 2 KB 边界对齐;低 11 位将被忽略。 ptrRead1
Type: UINT32
Write:指向右输入缓冲区的指针。按 2 KB 边界对齐;低 11 位将被忽略。 ptrWrite
Type: UINT32
Write:指向输出缓冲区的指针。按 64 字节边界对齐。 ptrOverlapAdd
Type: UINT32
Write:指向工作缓冲区的指针。按 128 字节边界对齐。 writeBufferOffsetRead
Type: UINT32
Write:输出缓冲区中读取指针的偏移量,以 256 字节为块单位。 reserved2
Type: UINT32
保留。 stopWhenDone
Type: UINT32
保留供内部使用。 interruptWhenDone
Type: UINT32
保留供内部使用。 reserved
Type: UINT32[6]
保留。

Remarks

此结构包含 XMA 解码器块的上下文。 输入缓冲区的最大大小为 8 MB。若要确定输入缓冲区的消耗状态,请检查 offsetReadcurrentBuffervalidBuffer 成员。 标记为 Read 的成员由音频控制处理器 (ACP) 库写入,应用程序只应读取它们。标记为 Write 的成员由你的应用程序设置,ACP 库不会更改它们。标记为 Read/Write 的成员由你的应用程序设置,但可能被 ACP 库更改。 有关详细信息,请参阅 SHAPE 概述XMA 部分。

Requirements

头文件: shapexmacontext.h 支持的平台: XBOX One 系列主机和 XBOX Series 主机

Conceptual documentation

See also

ShapeXmaContext
最后修改于 2026年8月24日