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

# SetShapeXmaInputBufferReadOffset

> SetShapeXmaInputBufferReadOffset

# SetShapeXmaInputBufferReadOffset

设置当前输入缓冲区的读取偏移量。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
HRESULT SetShapeXmaInputBufferReadOffset(  
         SHAPE_XMA_CONTEXT* context,  
         UINT32 offsetInBits  
)  
```

<a id="parametersSection" />

### 参数

*context*   \_Inout\_\
Type: [SHAPE\_XMA\_CONTEXT](/reference/audio/shapexmacontext/structs/shape_xma_context)\*

指向 [SHAPE\_XMA\_CONTEXT](/reference/audio/shapexmacontext/structs/shape_xma_context) 对象的指针。

*offsetInBits*   \
Type: UINT32

距输入缓冲区起始位置的偏移量(以位为单位)。

<a id="retvalSection" />

### 返回值

Type: HRESULT

HRESULT 成功或错误代码。

<a id="remarksSection" />

## 备注

对于硬件 XMA 解码器,XMA 上下文的读取偏移量通常应初始化为 32,或 32 加上 2048 字节的某个倍数。
若要获取当前输入缓冲区,请使用 [GetShapeXmaCurrentInputBuffer](/reference/audio/shapexmacontext/functions/getshapexmacurrentinputbuffer)。

若要获取当前输入缓冲区的读取偏移量,请使用 [GetShapeXmaInputBufferReadOffset](/reference/audio/shapexmacontext/functions/getshapexmainputbufferreadoffset)。

有关详细信息,请参阅 [Overview of SHAPE](/build/console-features/audio/overviews/shape-overview) 的 [XMA](/build/console-features/audio/overviews/shape-overview#ID4EYD) 部分。

<a id="requirementsSection" />

## 要求

**头文件:** shapexmacontext.h

**支持的平台:** XBOX One 系列主机和 XBOX Series 主机

<a id="seealsoSection" />

## 另请参阅

[ShapeXmaContext](/reference/audio/shapexmacontext/shapexmacontext_members)


## Related topics

- [GetShapeXmaInputBufferReadOffset](/zh-CN/reference/audio/shapexmacontext/functions/getshapexmainputbufferreadoffset.md)
- [SetShapeXmaOutputBufferReadOffset](/zh-CN/reference/audio/shapexmacontext/functions/setshapexmaoutputbufferreadoffset.md)
- [ShapeXmaContext](/zh-CN/reference/audio/shapexmacontext/shapexmacontext_members.md)
- [GetShapeXmaOutputBufferReadOffset](/zh-CN/reference/audio/shapexmacontext/functions/getshapexmaoutputbufferreadoffset.md)
- [SetShapeXmaCurrentInputBuffer](/zh-CN/reference/audio/shapexmacontext/functions/setshapexmacurrentinputbuffer.md)
