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

# GetXmaSampleRate

> GetXmaSampleRate

# GetXmaSampleRate

此函式會取得對應至一般取樣率的合法 XBOX Media Audio (XMA) 取樣率 (24、32、44.1 或 48 KHz)。

## 語法

```cpp theme={null}
DWORD GetXmaSampleRate(  
         DWORD dwGeneralRate  
)  
```

### 參數

*dwGeneralRate*   \
類型：DWORD

一般取樣率。

### 傳回值

類型：DWORD

取樣率。

## 備註

`GetXmaSampleRate` 是內嵌協助程式函式。所有高於 44100 Hz 之取樣率的預設 XMA 取樣率為 48000 Hz。如需 XMA2 的詳細資訊，請參閱 [XMA2 概觀](/zh-TW/build/console-features/audio/overviews/xma2-overview)。如需 XBOX One 音訊架構的概觀，請參閱**未來之聲**：[XBOX One 的音訊架構](/zh-TW/build/console-features/audio/overviews/xbox-one-audio-architecture)。

## 需求

**標頭：** xma2defs.h

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

## 另請參閱

[xma2defs](/zh-TW/reference/audio/xma2defs/xma2defs_members)


## Related topics

- [GetXmaSampleRate](/reference/audio/xma2defs/functions/getxmasamplerate.md)
- [XMA2Defs](/reference/audio/xma2defs/xma2defs_members.md)
- [SHAPE_XMA_SAMPLE_RATE](/reference/audio/shapexmacontext/enums/shape_xma_sample_rate.md)
