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

# SHARED_SHAPE_CONTEXTS

> SHARED_SHAPE_CONTEXTS

# SHARED\_SHAPE\_CONTEXTS

當可調整硬體音訊處理引擎 (SHAPE) 和 XBOX Media Audio (XMA) 資源與 `XAudio2` 執行個體共用時，會使用此結構。

## 語法

```cpp theme={null}
typedef struct SHARED_SHAPE_CONTEXTS {  
    SHAPE_CONTEXTS* shapeContexts;  
    UINT32 sharedSrcContextIndex;  
    UINT32 sharedEqCompContextIndex;  
    UINT32 sharedFiltVolContextIndex;  
    UINT32 sharedDmaContextIndex;  
    UINT32 sharedXmaContextIndex;  
    UINT32 sharedPcmContextIndex;  
    UINT32 numSharedSrcContexts;  
    UINT32 numSharedEqCompContexts;  
    UINT32 numSharedFiltVolContexts;  
    UINT32 numSharedDmaContexts;  
    UINT32 numSharedXmaContexts;  
    UINT32 numSharedPcmContexts;  
} SHARED_SHAPE_CONTEXTS  
```

### 成員

*shapeContexts*\
類型：[SHAPE\_CONTEXTS\*](/zh-TW/reference/audio/acphal/structs/shape_contexts)

指向 [SHAPE\_CONTEXTS](/zh-TW/reference/audio/acphal/structs/shape_contexts) 結構的指標。

*sharedSrcContextIndex*\
類型：UINT32

要共用的第一個取樣率轉換器 (SRC) 內容的索引。

*sharedEqCompContextIndex*\
類型：UINT32

要共用的第一個 EQ/Comp 內容的索引。

*sharedFiltVolContextIndex*\
類型：UINT32

要共用的第一個 Filter/Volume 內容的索引。

*sharedDmaContextIndex*\
類型：UINT32

要共用的第一個直接記憶體存取 (DMA) 內容的索引。

*sharedXmaContextIndex*\
類型：UINT32

要共用的第一個 XMA 內容的索引。

*sharedPcmContextIndex*\
類型：UINT32

要共用的第一個脈衝編碼調變 (PCM) 內容的索引。

*numSharedSrcContexts*\
類型：UINT32

從 *sharedSrcContextIndex* 開始要共用的 SRC 內容數目。

*numSharedEqCompContexts*\
類型：UINT32

從 *sharedEqCompContextIndex* 開始要共用的 EQ/Comp 內容數目。

*numSharedFiltVolContexts*\
類型：UINT32

從 *sharedFiltVolContextIndex* 開始要共用的 Filter/Volume 內容數目。

*numSharedDmaContexts*\
類型：UINT32

從 *sharedDmaContextIndex* 開始要共用的 DMA 內容數目。

*numSharedXmaContexts*\
類型：UINT32

從 *sharedXmaContextIndex* 開始要共用的 XMA 內容數目。

*numSharedPcmContexts*\
類型：UINT32

從 *sharedPcmContextIndex* 開始要共用的 PCM 內容數目。

## 備註

此結構由 [XAudio2CreateWithSharedContexts](/zh-TW/reference/audio/xaudio2xbox/functions/xaudio2createwithsharedcontexts) 函式使用。此函式的運作方式與 `XAudio2Create` 相同，但會接受 `SHARED_SHAPE_CONTEXTS` 作為額外的參數。您可以在多個 `IXAudio2` 執行個體之間共用 SHAPE 的狀態。

## 需求

**標頭：** acphal.h

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

## 另請參閱

[XAudio2CreateWithSharedContexts](/zh-TW/reference/audio/xaudio2xbox/functions/xaudio2createwithsharedcontexts)\
[XAudio2Create](https://learn.microsoft.com/windows/desktop/api/xaudio2/nf-xaudio2-xaudio2create)\
[AcpHal](/zh-TW/reference/audio/acphal/acphal_members)


## Related topics

- [XAudio2CreateWithSharedContexts](/zh-TW/reference/audio/xaudio2xbox/functions/xaudio2createwithsharedcontexts.md)
- [AcpHal](/zh-TW/reference/audio/acphal/acphal_members.md)
- [SHAPE_CONTEXTS](/zh-TW/reference/audio/acphal/structs/shape_contexts.md)
- [ShapeContexts](/zh-TW/reference/audio/shapecontexts/shapecontexts_members.md)
- [SHAPE_SRC_CONTEXT](/zh-TW/reference/audio/shapesrccontext/structs/shape_src_context.md)
