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

# SetShapeXmaInputBufferValid

> SetShapeXmaInputBufferValid

# SetShapeXmaInputBufferValid

設定輸入緩衝區的有效性旗標。

## 語法

```cpp theme={null}
HRESULT SetShapeXmaInputBufferValid(  
         SHAPE_XMA_CONTEXT* context,  
         UINT32 valid  
)  
```

### 參數

*context*   \_In\_\
類型：[SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/zh-TW/reference/audio/shapexmacontext/structs/shape_xma_context.md)\*

指向 [SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/zh-TW/reference/audio/shapexmacontext/structs/shape_xma_context.md) 物件的指標。

*valid*   \
類型：UINT32

輸入緩衝區的有效性旗標。

| 值 | 描述 |
| - | - |
| 00 | 兩個緩衝區皆無效。 |
| 01 | 只有緩衝區 0 (左側) 有效。 |
| 10 | 只有緩衝區 1 (右側) 有效。 |
| 11 | 兩個緩衝區皆有效。 |

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

若要取得輸入緩衝區的有效性旗標，請使用 [GetShapeXmaInputBufferValid](https://docs.xbox.com/zh-TW/reference/audio/shapexmacontext/functions/getshapexmainputbuffervalid.md)。

若要設定輸出緩衝區的有效性旗標，請使用 [SetShapeXmaOutputBufferValid](https://docs.xbox.com/zh-TW/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffervalid.md)。

如需詳細資訊，請參閱 [SHAPE 概觀](https://docs.xbox.com/zh-TW/build/console-features/audio/overviews/shape-overview.md)中的 [XMA](https://docs.xbox.com/zh-TW/build/console-features/audio/overviews/shape-overview.md#ID4EYD) 一節。

## 需求

**標頭：** shapexmacontext.h

**支援的平台：** XBOX One 系列主機與 XBOX Series 主機

## 另請參閱

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


## Related topics

- [GetShapeXmaInputBufferValid](https://docs.xbox.com/zh-TW/reference/audio/shapexmacontext/functions/getshapexmainputbuffervalid.md)
- [SetShapeXmaOutputBufferValid](https://docs.xbox.com/zh-TW/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffervalid.md)
- [ShapeXmaContext](https://docs.xbox.com/zh-TW/reference/audio/shapexmacontext/shapexmacontext_members.md)
- [SetShapeXmaInputBuffer0Valid](https://docs.xbox.com/zh-TW/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0valid.md)
- [SetShapeXmaInputBuffer1Valid](https://docs.xbox.com/zh-TW/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1valid.md)
