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

# GetXmaSampleRate

> GetXmaSampleRate

This function obtains the legal XBOX Media Audio (XMA) sample rate (24, 32, 44.1, or 48 KHz) that corresponds to a generic sample rate.

## Syntax

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

### Parameters

*dwGeneralRate*   \
Type: DWORD

Generic sample rate.

### Return value

Type: DWORD

The sample rate.

## Remarks

`GetXmaSampleRate` is an inline helper function. The default XMA rate for all rates above 44100 Hz is 48000 Hz. For more information about XMA2, see [Overview of XMA2](https://docs.xbox.com/build/console-features/audio/overviews/xma2-overview.md). For an overview of the audio architecture of XBOX One, see **The sound of the future**: [The audio architecture in XBOX One](https://docs.xbox.com/build/console-features/audio/overviews/xbox-one-audio-architecture.md).

## Requirements

**Header:** xma2defs.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[xma2defs](https://docs.xbox.com/reference/audio/xma2defs/xma2defs_members.md)


## Related topics

- [XMA2Defs](https://docs.xbox.com/reference/audio/xma2defs/xma2defs_members.md)
- [SHAPE_XMA_SAMPLE_RATE](https://docs.xbox.com/reference/audio/shapexmacontext/enums/shape_xma_sample_rate.md)
- [GetShapeXmaSampleRate](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmasamplerate.md)
- [SetShapeXmaSampleRate(SHAPE_XMA_CONTEXT*, SHAPE_XMA_SAMPLE_RATE)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmasamplerate.md)
- [SetShapeXmaSampleRate(SHAPE_XMA_CONTEXT*, UINT32)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmasamplerate_2.md)
