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

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](/build/console-features/audio/overviews/xma2-overview). For an overview of the audio architecture of XBOX One, see **The sound of the future**: [The audio architecture in XBOX One](/build/console-features/audio/overviews/xbox-one-audio-architecture).

## Requirements

**Header:** xma2defs.h

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

## See also

[xma2defs](/reference/audio/xma2defs/xma2defs_members)


## Related topics

- [XMA2Defs](/reference/audio/xma2defs/xma2defs_members.md)
- [SHAPE_XMA_SAMPLE_RATE](/reference/audio/shapexmacontext/enums/shape_xma_sample_rate.md)
- [GetShapeXmaSampleRate](/reference/audio/shapexmacontext/functions/getshapexmasamplerate.md)
- [SetShapeXmaSampleRate(SHAPE_XMA_CONTEXT*, SHAPE_XMA_SAMPLE_RATE)](/reference/audio/shapexmacontext/functions/setshapexmasamplerate.md)
- [GetXmaDecodePositionForSample](/reference/audio/xma2defs/functions/getxmadecodepositionforsample.md)
