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

# GetXmaDecodePositionForSample

> GetXmaDecodePositionForSample

# GetXmaDecodePositionForSample

디코더가 지정된 XBOX Media Audio(XMA) 블록의 시작을 기준으로 하는 지정된 샘플 위치에서 시작하여 오디오를 생성하도록 하는 데 필요한 데이터를 가져옵니다.

## 구문

```cpp theme={null}
HRESULT GetXmaDecodePositionForSample(  
         const BYTE* pXmaData,  
         DWORD nXmaDataBytes,  
         DWORD nStreamIndex,  
         DWORD nDesiredSample,  
         DWORD* pnBitOffset,  
         DWORD* pnSubFrame  
)  
```

### 매개 변수

*pXmaData*   \_In\_bytecount\_(nXmaDataBytes)\
형식: BYTE\*

XMA 블록에 대한 포인터입니다.

*nXmaDataBytes*   \
형식: DWORD

pXmaData의 바이트 단위 크기입니다.

*nStreamIndex*   \
형식: DWORD

탐색할 스트림입니다.

*nDesiredSample*   \
형식: DWORD

찾을 샘플입니다.

*pnBitOffset*   \_Out\_\
형식: DWORD\*

찾을 샘플을 포함하는 프레임의 pXmaData 내 비트 오프셋을 반환합니다.

*pnSubFrame*   \_Out\_\
형식: DWORD\*

샘플을 포함하는 서브프레임을 반환합니다.

### 반환 값

형식: HRESULT

성공하면 `S_OK`, 실패하면 `E_FAIL` 코드입니다.

## 설명

이 함수는 디코더가 지정된 XMA 블록의 시작을 기준으로 하는 지정된 샘플 위치에서 시작하여 오디오를 생성하도록 하는 데 필요한 데이터를 가져옵니다. 여기에는 적절한 프레임의 비트 오프셋과 해당 프레임 내의 올바른 서브프레임이 포함됩니다. 데이터는 `XMAPlaybackSetDecodePosition` 함수로 직접 전달할 수 있습니다. XMA2에 대한 자세한 내용은 [XMA2 개요](/build/console-features/audio/overviews/xma2-overview)를 참조하세요. XBOX One의 오디오 아키텍처 개요는 **미래의 사운드**: [XBOX One의 오디오 아키텍처](/build/console-features/audio/overviews/xbox-one-audio-architecture)를 참조하세요.

## 요구 사항

**헤더:** xma2defs.h

**지원 플랫폼:** XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 관련 항목

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


## Related topics

- [XMA2Defs](/ko/reference/audio/xma2defs/xma2defs_members.md)
- [GetXmaFrameBitPosition](/ko/reference/audio/xma2defs/functions/getxmaframebitposition.md)
- [GetLastXmaFrameBitPosition](/ko/reference/audio/xma2defs/functions/getlastxmaframebitposition.md)
- [GetShapeXmaNumSubframesToDecode](/ko/reference/audio/shapexmacontext/functions/getshapexmanumsubframestodecode.md)
- [SetSamplePositions](/ko/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/methods/id3d12graphicscommandlist1_setsamplepositions_public.md)
