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

# SetShapeXmaCurrentInputBuffer

> SetShapeXmaCurrentInputBuffer

# SetShapeXmaCurrentInputBuffer

设置当前输入缓冲区。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
HRESULT SetShapeXmaCurrentInputBuffer(  
         SHAPE_XMA_CONTEXT* context,  
         UINT32 currentBuffer  
)  
```

<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) 对象的指针。

*currentBuffer*   \
Type: UINT32

当前输入缓冲区。0 指定左缓冲区,1 指定右缓冲区。

<a id="retvalSection" />

### 返回值

Type: HRESULT

HRESULT 成功或错误代码。

<a id="remarksSection" />

## 备注

若要设置左输入缓冲区的地址,请使用 [SetShapeXmaInputBuffer0(SHAPE\_XMA\_CONTEXT\*, const void\*)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0) 或 [SetShapeXmaInputBuffer0(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0_2)。 若要设置右输入缓冲区的地址,请使用 [SetShapeXmaInputBuffer1(SHAPE\_XMA\_CONTEXT\*, const void\*)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1) 或 [SetShapeXmaInputBuffer1(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1_2)。

若要获取当前输入缓冲区,请使用 [GetShapeXmaCurrentInputBuffer](/reference/audio/shapexmacontext/functions/getshapexmacurrentinputbuffer)。

有关详细信息,请参阅 [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

- [GetShapeXmaCurrentInputBuffer](/zh-CN/reference/audio/shapexmacontext/functions/getshapexmacurrentinputbuffer.md)
- [ShapeXmaContext](/zh-CN/reference/audio/shapexmacontext/shapexmacontext_members.md)
- [SetShapeXmaInputBufferReadOffset](/zh-CN/reference/audio/shapexmacontext/functions/setshapexmainputbufferreadoffset.md)
- [GetShapeXmaInputBufferReadOffset](/zh-CN/reference/audio/shapexmacontext/functions/getshapexmainputbufferreadoffset.md)
- [SetShapeXmaInputBufferValid](/zh-CN/reference/audio/shapexmacontext/functions/setshapexmainputbuffervalid.md)
