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

# SetShapeEqCompRatio

> SetShapeEqCompRatio

# SetShapeEqCompRatio

コンプレッション レシオを設定します。

## Syntax

```cpp theme={null}
HRESULT SetShapeEqCompRatio(  
         SHAPE_EQCOMP_CONTEXT* context,  
         float ratio  
)  
```

### パラメーター

*context*   \_Inout\_\
型: [SHAPE\_EQCOMP\_CONTEXT\*](/reference/audio/shapeeqcompcontext/structs/shape_eqcomp_context)

SHAPE\_EQCOMP\_CONTEXT オブジェクトへのポインター。

*ratio*   \
型: float

コンプレッション レシオ。

### 戻り値

型: HRESULT

HRESULT の成功またはエラー コード。

## 解説

コンプレッサーは、入力レベルと出力レベルの比率に応じてサウンド データを変化させます。この比率は、入力信号がしきい値を超えたときにどの程度の減衰を行うかを決定します。たとえば、2:1 の比率では、しきい値を 2 dB 超えるごとに、コンプレッサーの出力はしきい値レベルを 1 dB 超えます。1:1 の比率では、コンプレッサーは実質的にオフになります。

詳細については、[SHAPE の概要](/build/console-features/audio/overviews/shape-overview)の[イコライゼーションおよびコンプレッション](/build/console-features/audio/overviews/shape-overview#ID4ECF)を参照してください。

## 要件

**ヘッダー:** shapeeqcompcontext.h

**対応プラットフォーム:** XBOX One ファミリ本体および XBOX Series 本体

## 関連項目

[ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [ShapeEqCompContext](/ja-jp/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [GetShapeEqCompRatio](/ja-jp/reference/audio/shapeeqcompcontext/functions/getshapeeqcompratio.md)
- [SetShapeEqCompRelease](/ja-jp/reference/audio/shapeeqcompcontext/functions/setshapeeqcomprelease.md)
- [SetShapeEqCompThreshold](/ja-jp/reference/audio/shapeeqcompcontext/functions/setshapeeqcompthreshold.md)
- [SetShapeEqCompGain](/ja-jp/reference/audio/shapeeqcompcontext/functions/setshapeeqcompgain.md)
