RetroArch
Classes | Macros | Typedefs | Functions
xma2defs.h File Reference
#include <sal.h>
#include <winerror.h>
#include <audiodefs.h>
Include dependency graph for xma2defs.h:

Go to the source code of this file.

Classes

struct  XMA2WAVEFORMATEX
 
struct  XMASTREAMFORMAT
 
struct  XMAWAVEFORMAT
 
struct  XMA2STREAMFORMAT
 
struct  XMA2WAVEFORMAT
 
struct  XMA2PACKET
 

Macros

#define XMA_OUTPUT_SAMPLE_BYTES   2u
 
#define XMA_OUTPUT_SAMPLE_BITS   (XMA_OUTPUT_SAMPLE_BYTES * 8u)
 
#define XMA_BYTES_PER_PACKET   2048u
 
#define XMA_BITS_PER_PACKET   (XMA_BYTES_PER_PACKET * 8u)
 
#define XMA_PACKET_HEADER_BYTES   4u
 
#define XMA_PACKET_HEADER_BITS   (XMA_PACKET_HEADER_BYTES * 8u)
 
#define XMA_SAMPLES_PER_FRAME   512u
 
#define XMA_SAMPLES_PER_SUBFRAME   128u
 
#define XMA_READBUFFER_MAX_PACKETS   4095u
 
#define XMA_READBUFFER_MAX_BYTES   (XMA_READBUFFER_MAX_PACKETS * XMA_BYTES_PER_PACKET)
 
#define XMA_WRITEBUFFER_MAX_BYTES   (31u * 256u)
 
#define XMA_WRITEBUFFER_BYTE_ALIGNMENT   256u
 
#define XMA_MIN_SUBFRAMES_TO_DECODE   1u
 
#define XMA_MAX_SUBFRAMES_TO_DECODE   8u
 
#define XMA_OPTIMAL_SUBFRAMES_TO_DECODE   4u
 
#define XMA_MAX_LOOPCOUNT   254u
 
#define XMA_INFINITE_LOOP   255u
 
#define WAVE_FORMAT_XMA2   0x166
 
#define WAVE_FORMAT_XMA   0x0165
 
#define XMA_SPEAKER_LEFT   0x01
 
#define XMA_SPEAKER_RIGHT   0x02
 
#define XMA_SPEAKER_CENTER   0x04
 
#define XMA_SPEAKER_LFE   0x08
 
#define XMA_SPEAKER_LEFT_SURROUND   0x10
 
#define XMA_SPEAKER_RIGHT_SURROUND   0x20
 
#define XMA_SPEAKER_LEFT_BACK   0x40
 
#define XMA_SPEAKER_RIGHT_BACK   0x80
 
#define XMA_BITS_IN_FRAME_LENGTH_FIELD   15
 
#define XMA_FINAL_FRAME_MARKER   0x7FFF
 
#define XMA2DEFS_ASSERT(a)   /* No-op by default */
 
#define XMASWAP2BYTES(n)   ((WORD)(((n) >> 8) | (((n) & 0xff) << 8)))
 
#define XMASWAP4BYTES(n)   ((DWORD)((n) >> 24 | (n) << 24 | ((n) & 0xff00) << 8 | ((n) & 0xff0000) >> 8))
 

Typedefs

typedef struct XMA2WAVEFORMATEX XMA2WAVEFORMATEX
 
typedef struct XMA2WAVEFORMATEXPXMA2WAVEFORMATEX
 
typedef struct XMASTREAMFORMAT XMASTREAMFORMAT
 
typedef struct XMAWAVEFORMAT XMAWAVEFORMAT
 
typedef struct XMA2STREAMFORMAT XMA2STREAMFORMAT
 
typedef struct XMA2WAVEFORMAT XMA2WAVEFORMAT
 
typedef struct XMA2PACKET XMA2PACKET
 

Functions

__inline DWORD GetXmaPacketFrameCount (__in_bcount(1) const BYTE *pPacket)
 
__inline DWORD GetXmaPacketFirstFrameOffsetInBits (__in_bcount(3) const BYTE *pPacket)
 
__inline DWORD GetXmaPacketMetadata (__in_bcount(3) const BYTE *pPacket)
 
__inline DWORD GetXmaPacketSkipCount (__in_bcount(4) const BYTE *pPacket)
 
__inline HRESULT GetXmaBlockContainingSample (DWORD nBlockCount, __in_ecount(nBlockCount) const DWORD *pSeekTable, DWORD nDesiredSample, __out DWORD *pnBlockContainingSample, __out DWORD *pnSampleOffsetWithinBlock)
 
__inline DWORD GetXmaFrameLengthInBits (__in_bcount(nBitPosition/8+3) __in const BYTE *pPacket, DWORD nBitPosition)
 
__inline DWORD GetXmaFrameBitPosition (__in_bcount(nXmaDataBytes) const BYTE *pXmaData, DWORD nXmaDataBytes, DWORD nStreamIndex, DWORD nDesiredFrame)
 
__inline DWORD GetLastXmaFrameBitPosition (__in_bcount(nXmaDataBytes) const BYTE *pXmaData, DWORD nXmaDataBytes, DWORD nStreamIndex)
 
__inline HRESULT GetXmaDecodePositionForSample (__in_bcount(nXmaDataBytes) const BYTE *pXmaData, DWORD nXmaDataBytes, DWORD nStreamIndex, DWORD nDesiredSample, __out DWORD *pnBitOffset, __out DWORD *pnSubFrame)
 
__inline DWORD GetXmaSampleRate (DWORD dwGeneralRate)
 
__inline DWORD GetStandardChannelMaskFromXmaMask (BYTE bXmaMask)
 
__inline BYTE GetXmaChannelMaskFromStandardMask (DWORD dwStandardMask)
 
__inline HRESULT LocalizeXma2Format (__inout XMA2WAVEFORMATEX *pXma2Format)
 

Macro Definition Documentation

◆ WAVE_FORMAT_XMA

#define WAVE_FORMAT_XMA   0x0165

◆ WAVE_FORMAT_XMA2

#define WAVE_FORMAT_XMA2   0x166

◆ XMA2DEFS_ASSERT

#define XMA2DEFS_ASSERT (   a)    /* No-op by default */

◆ XMA_BITS_IN_FRAME_LENGTH_FIELD

#define XMA_BITS_IN_FRAME_LENGTH_FIELD   15

◆ XMA_BITS_PER_PACKET

#define XMA_BITS_PER_PACKET   (XMA_BYTES_PER_PACKET * 8u)

◆ XMA_BYTES_PER_PACKET

#define XMA_BYTES_PER_PACKET   2048u

◆ XMA_FINAL_FRAME_MARKER

#define XMA_FINAL_FRAME_MARKER   0x7FFF

◆ XMA_INFINITE_LOOP

#define XMA_INFINITE_LOOP   255u

◆ XMA_MAX_LOOPCOUNT

#define XMA_MAX_LOOPCOUNT   254u

◆ XMA_MAX_SUBFRAMES_TO_DECODE

#define XMA_MAX_SUBFRAMES_TO_DECODE   8u

◆ XMA_MIN_SUBFRAMES_TO_DECODE

#define XMA_MIN_SUBFRAMES_TO_DECODE   1u

◆ XMA_OPTIMAL_SUBFRAMES_TO_DECODE

#define XMA_OPTIMAL_SUBFRAMES_TO_DECODE   4u

◆ XMA_OUTPUT_SAMPLE_BITS

#define XMA_OUTPUT_SAMPLE_BITS   (XMA_OUTPUT_SAMPLE_BYTES * 8u)

◆ XMA_OUTPUT_SAMPLE_BYTES

#define XMA_OUTPUT_SAMPLE_BYTES   2u

◆ XMA_PACKET_HEADER_BITS

#define XMA_PACKET_HEADER_BITS   (XMA_PACKET_HEADER_BYTES * 8u)

◆ XMA_PACKET_HEADER_BYTES

#define XMA_PACKET_HEADER_BYTES   4u

◆ XMA_READBUFFER_MAX_BYTES

#define XMA_READBUFFER_MAX_BYTES   (XMA_READBUFFER_MAX_PACKETS * XMA_BYTES_PER_PACKET)

◆ XMA_READBUFFER_MAX_PACKETS

#define XMA_READBUFFER_MAX_PACKETS   4095u

◆ XMA_SAMPLES_PER_FRAME

#define XMA_SAMPLES_PER_FRAME   512u

◆ XMA_SAMPLES_PER_SUBFRAME

#define XMA_SAMPLES_PER_SUBFRAME   128u

◆ XMA_SPEAKER_CENTER

#define XMA_SPEAKER_CENTER   0x04

◆ XMA_SPEAKER_LEFT

#define XMA_SPEAKER_LEFT   0x01

◆ XMA_SPEAKER_LEFT_BACK

#define XMA_SPEAKER_LEFT_BACK   0x40

◆ XMA_SPEAKER_LEFT_SURROUND

#define XMA_SPEAKER_LEFT_SURROUND   0x10

◆ XMA_SPEAKER_LFE

#define XMA_SPEAKER_LFE   0x08

◆ XMA_SPEAKER_RIGHT

#define XMA_SPEAKER_RIGHT   0x02

◆ XMA_SPEAKER_RIGHT_BACK

#define XMA_SPEAKER_RIGHT_BACK   0x80

◆ XMA_SPEAKER_RIGHT_SURROUND

#define XMA_SPEAKER_RIGHT_SURROUND   0x20

◆ XMA_WRITEBUFFER_BYTE_ALIGNMENT

#define XMA_WRITEBUFFER_BYTE_ALIGNMENT   256u

◆ XMA_WRITEBUFFER_MAX_BYTES

#define XMA_WRITEBUFFER_MAX_BYTES   (31u * 256u)

◆ XMASWAP2BYTES

#define XMASWAP2BYTES (   n)    ((WORD)(((n) >> 8) | (((n) & 0xff) << 8)))

◆ XMASWAP4BYTES

#define XMASWAP4BYTES (   n)    ((DWORD)((n) >> 24 | (n) << 24 | ((n) & 0xff00) << 8 | ((n) & 0xff0000) >> 8))

Typedef Documentation

◆ PXMA2WAVEFORMATEX

◆ XMA2PACKET

typedef struct XMA2PACKET XMA2PACKET

◆ XMA2STREAMFORMAT

◆ XMA2WAVEFORMAT

◆ XMA2WAVEFORMATEX

◆ XMASTREAMFORMAT

◆ XMAWAVEFORMAT

typedef struct XMAWAVEFORMAT XMAWAVEFORMAT

Function Documentation

◆ GetLastXmaFrameBitPosition()

__inline DWORD GetLastXmaFrameBitPosition ( __in_bcount(nXmaDataBytes) const BYTE *  pXmaData,
DWORD  nXmaDataBytes,
DWORD  nStreamIndex 
)
Here is the call graph for this function:

◆ GetStandardChannelMaskFromXmaMask()

__inline DWORD GetStandardChannelMaskFromXmaMask ( BYTE  bXmaMask)

◆ GetXmaBlockContainingSample()

__inline HRESULT GetXmaBlockContainingSample ( DWORD  nBlockCount,
__in_ecount(nBlockCount) const DWORD *  pSeekTable,
DWORD  nDesiredSample,
__out DWORD *  pnBlockContainingSample,
__out DWORD *  pnSampleOffsetWithinBlock 
)

◆ GetXmaChannelMaskFromStandardMask()

__inline BYTE GetXmaChannelMaskFromStandardMask ( DWORD  dwStandardMask)

◆ GetXmaDecodePositionForSample()

__inline HRESULT GetXmaDecodePositionForSample ( __in_bcount(nXmaDataBytes) const BYTE *  pXmaData,
DWORD  nXmaDataBytes,
DWORD  nStreamIndex,
DWORD  nDesiredSample,
__out DWORD *  pnBitOffset,
__out DWORD *  pnSubFrame 
)
Here is the call graph for this function:

◆ GetXmaFrameBitPosition()

__inline DWORD GetXmaFrameBitPosition ( __in_bcount(nXmaDataBytes) const BYTE *  pXmaData,
DWORD  nXmaDataBytes,
DWORD  nStreamIndex,
DWORD  nDesiredFrame 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXmaFrameLengthInBits()

__inline DWORD GetXmaFrameLengthInBits ( __in_bcount(nBitPosition/8+3) __in const BYTE *  pPacket,
DWORD  nBitPosition 
)
Here is the caller graph for this function:

◆ GetXmaPacketFirstFrameOffsetInBits()

__inline DWORD GetXmaPacketFirstFrameOffsetInBits ( __in_bcount(3) const BYTE *  pPacket)
Here is the caller graph for this function:

◆ GetXmaPacketFrameCount()

__inline DWORD GetXmaPacketFrameCount ( __in_bcount(1) const BYTE *  pPacket)
Here is the caller graph for this function:

◆ GetXmaPacketMetadata()

__inline DWORD GetXmaPacketMetadata ( __in_bcount(3) const BYTE *  pPacket)

◆ GetXmaPacketSkipCount()

__inline DWORD GetXmaPacketSkipCount ( __in_bcount(4) const BYTE *  pPacket)
Here is the caller graph for this function:

◆ GetXmaSampleRate()

__inline DWORD GetXmaSampleRate ( DWORD  dwGeneralRate)

◆ LocalizeXma2Format()

__inline HRESULT LocalizeXma2Format ( __inout XMA2WAVEFORMATEX pXma2Format)