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

# SetShapeEqCompAttack

> SetShapeEqCompAttack

# SetShapeEqCompAttack

設定壓縮啟動乘數。

## 語法

```cpp theme={null}
HRESULT SetShapeEqCompAttack(  
         SHAPE_EQCOMP_CONTEXT* context,  
         float attack  
)  
```

### 參數

*context*   \_Inout\_\
類型：[SHAPE\_EQCOMP\_CONTEXT\*](/zh-TW/reference/audio/shapeeqcompcontext/structs/shape_eqcomp_context)

指向 `SHAPE_EQCOMP_CONTEXT` 物件的指標。

*attack*   \
類型：float

啟動乘數。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

啟動 (attack) 與釋放 (release) 以毫秒為單位指定，對應於壓縮器在訊號超過或低於臨界值時，應以多快的速度變更輸出增益。這些調整可以是線性或對數式。

輸入超過臨界值的時間達到啟動所指定的時間後，才會達到所需的輸出位準；同樣地，輸入低於臨界值的時間達到釋放所指定的時間後，才會回到單位增益。

如需詳細資訊，請參閱 [SHAPE 概觀](/zh-TW/build/console-features/audio/overviews/shape-overview)中的[等化與壓縮](/zh-TW/build/console-features/audio/overviews/shape-overview#ID4ECF)。

## 需求

**標頭：** shapeeqcompcontext.h

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

## 另請參閱

[ShapeEqCompContext](/zh-TW/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [ShapeEqCompContext](/zh-TW/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [GetShapeEqCompAttack](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcompattack.md)
- [SetShapeEqCompRelease](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcomprelease.md)
- [SetShapeEqCompThreshold](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompthreshold.md)
- [SetShapeEqCompGain](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompgain.md)
