> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SetShapeXmaCurrentInputBuffer

> SetShapeXmaCurrentInputBuffer

# SetShapeXmaCurrentInputBuffer

设置当前输入缓冲区。

## 语法

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

### 参数

*context*   \_Inout\_\
Type: [SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/zh-CN/reference/audio/shapexmacontext/structs/shape_xma_context.md)\*

指向 [SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/zh-CN/reference/audio/shapexmacontext/structs/shape_xma_context.md) 对象的指针。

*currentBuffer*   \
Type: UINT32

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

### 返回值

Type: HRESULT

HRESULT 成功或错误代码。

## 备注

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

若要获取当前输入缓冲区,请使用 [GetShapeXmaCurrentInputBuffer](https://docs.xbox.com/zh-CN/reference/audio/shapexmacontext/functions/getshapexmacurrentinputbuffer.md)。

有关详细信息,请参阅 [Overview of SHAPE](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/shape-overview.md) 的 [XMA](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/shape-overview.md#ID4EYD) 部分。

## 要求

**头文件:** shapexmacontext.h

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

## 另请参阅

[ShapeXmaContext](https://docs.xbox.com/zh-CN/reference/audio/shapexmacontext/shapexmacontext_members.md)


## Related topics

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