zenilib: zenilib/jni/external/sdl/SDL/xma2defs.h File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions
xma2defs.h File Reference
`#include <sal.h>`
`#include <winerror.h>`
`#include <audiodefs.h>`

Go to the source code of this file.

## Classes

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

## Macros

#define | WAVE_FORMAT_XMA 0x0165
#define | WAVE_FORMAT_XMA2 0x166
#define | XMA2DEFS_ASSERT(a) /* No-op by default */
#define | XMA_BITS_IN_FRAME_LENGTH_FIELD 15
#define | XMA_BITS_PER_PACKET (XMA_BYTES_PER_PACKET * 8u)
#define | XMA_BYTES_PER_PACKET 2048u
#define | XMA_FINAL_FRAME_MARKER 0x7FFF
#define | XMA_INFINITE_LOOP 255u
#define | XMA_MAX_LOOPCOUNT 254u
#define | XMA_MAX_SUBFRAMES_TO_DECODE 8u
#define | XMA_MIN_SUBFRAMES_TO_DECODE 1u
#define | XMA_OPTIMAL_SUBFRAMES_TO_DECODE 4u
#define | XMA_OUTPUT_SAMPLE_BITS (XMA_OUTPUT_SAMPLE_BYTES * 8u)
#define | XMA_OUTPUT_SAMPLE_BYTES 2u
#define | XMA_PACKET_HEADER_BITS (XMA_PACKET_HEADER_BYTES * 8u)
#define | XMA_PACKET_HEADER_BYTES 4u
#define | XMA_READBUFFER_MAX_BYTES (XMA_READBUFFER_MAX_PACKETS * XMA_BYTES_PER_PACKET)
#define | XMA_READBUFFER_MAX_PACKETS 4095u
#define | XMA_SAMPLES_PER_FRAME 512u
#define | XMA_SAMPLES_PER_SUBFRAME 128u
#define | XMA_SPEAKER_CENTER 0x04
#define | XMA_SPEAKER_LEFT 0x01
#define | XMA_SPEAKER_LEFT_BACK 0x40
#define | XMA_SPEAKER_LEFT_SURROUND 0x10
#define | XMA_SPEAKER_LFE 0x08
#define | XMA_SPEAKER_RIGHT 0x02
#define | XMA_SPEAKER_RIGHT_BACK 0x80
#define | XMA_SPEAKER_RIGHT_SURROUND 0x20
#define | XMA_WRITEBUFFER_BYTE_ALIGNMENT 256u
#define | XMA_WRITEBUFFER_MAX_BYTES (31u * 256u)
#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 * | PXMA2WAVEFORMATEX
typedef struct XMA2PACKET | XMA2PACKET
typedef struct XMA2STREAMFORMAT | XMA2STREAMFORMAT
typedef struct XMA2WAVEFORMAT | XMA2WAVEFORMAT
typedef struct XMA2WAVEFORMATEX | XMA2WAVEFORMATEX
typedef struct XMASTREAMFORMAT | XMASTREAMFORMAT
typedef struct XMAWAVEFORMAT | XMAWAVEFORMAT

## Functions

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

## Macro Definition Documentation

#define WAVE_FORMAT_XMA 0x0165

Definition at line 220 of file xma2defs.h.

#define WAVE_FORMAT_XMA2 0x166

Definition at line 185 of file xma2defs.h.

Referenced by LocalizeXma2Format().

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

Definition at line 391 of file xma2defs.h.

Referenced by GetLastXmaFrameBitPosition(), GetXmaBlockContainingSample(), GetXmaDecodePositionForSample(), and GetXmaFrameBitPosition().

#define XMA_BITS_IN_FRAME_LENGTH_FIELD 15

Definition at line 374 of file xma2defs.h.

#define XMA_BITS_PER_PACKET (XMA_BYTES_PER_PACKET * 8u)

Definition at line 143 of file xma2defs.h.

#define XMA_BYTES_PER_PACKET 2048u

Definition at line 142 of file xma2defs.h.

Referenced by GetLastXmaFrameBitPosition(), and GetXmaFrameBitPosition().

#define XMA_FINAL_FRAME_MARKER 0x7FFF

Definition at line 377 of file xma2defs.h.

#define XMA_INFINITE_LOOP 255u

Definition at line 172 of file xma2defs.h.

#define XMA_MAX_LOOPCOUNT 254u

Definition at line 171 of file xma2defs.h.

#define XMA_MAX_SUBFRAMES_TO_DECODE 8u

Definition at line 167 of file xma2defs.h.

#define XMA_MIN_SUBFRAMES_TO_DECODE 1u

Definition at line 166 of file xma2defs.h.

#define XMA_OPTIMAL_SUBFRAMES_TO_DECODE 4u

Definition at line 168 of file xma2defs.h.

#define XMA_OUTPUT_SAMPLE_BITS (XMA_OUTPUT_SAMPLE_BYTES * 8u)

Definition at line 139 of file xma2defs.h.

#define XMA_OUTPUT_SAMPLE_BYTES 2u

Definition at line 138 of file xma2defs.h.

#define XMA_PACKET_HEADER_BITS (XMA_PACKET_HEADER_BYTES * 8u)

Definition at line 147 of file xma2defs.h.

Referenced by GetLastXmaFrameBitPosition(), and GetXmaFrameBitPosition().

#define XMA_PACKET_HEADER_BYTES 4u

Definition at line 146 of file xma2defs.h.

#define XMA_READBUFFER_MAX_BYTES (XMA_READBUFFER_MAX_PACKETS * XMA_BYTES_PER_PACKET)

Definition at line 157 of file xma2defs.h.

#define XMA_READBUFFER_MAX_PACKETS 4095u

Definition at line 156 of file xma2defs.h.

#define XMA_SAMPLES_PER_FRAME 512u

Definition at line 150 of file xma2defs.h.

Referenced by GetXmaDecodePositionForSample().

#define XMA_SAMPLES_PER_SUBFRAME 128u

Definition at line 153 of file xma2defs.h.

Referenced by GetXmaDecodePositionForSample().

#define XMA_SPEAKER_CENTER 0x04

Definition at line 227 of file xma2defs.h.

Referenced by GetStandardChannelMaskFromXmaMask(), and GetXmaChannelMaskFromStandardMask().

#define XMA_SPEAKER_LEFT 0x01

Definition at line 225 of file xma2defs.h.

Referenced by GetStandardChannelMaskFromXmaMask(), and GetXmaChannelMaskFromStandardMask().

#define XMA_SPEAKER_LEFT_BACK 0x40

Definition at line 231 of file xma2defs.h.

Referenced by GetStandardChannelMaskFromXmaMask(), and GetXmaChannelMaskFromStandardMask().

#define XMA_SPEAKER_LEFT_SURROUND 0x10

Definition at line 229 of file xma2defs.h.

Referenced by GetStandardChannelMaskFromXmaMask(), and GetXmaChannelMaskFromStandardMask().

#define XMA_SPEAKER_LFE 0x08

Definition at line 228 of file xma2defs.h.

Referenced by GetStandardChannelMaskFromXmaMask(), and GetXmaChannelMaskFromStandardMask().

#define XMA_SPEAKER_RIGHT 0x02

Definition at line 226 of file xma2defs.h.

Referenced by GetStandardChannelMaskFromXmaMask(), and GetXmaChannelMaskFromStandardMask().

#define XMA_SPEAKER_RIGHT_BACK 0x80

Definition at line 232 of file xma2defs.h.

Referenced by GetStandardChannelMaskFromXmaMask(), and GetXmaChannelMaskFromStandardMask().

#define XMA_SPEAKER_RIGHT_SURROUND 0x20

Definition at line 230 of file xma2defs.h.

Referenced by GetStandardChannelMaskFromXmaMask(), and GetXmaChannelMaskFromStandardMask().

#define XMA_WRITEBUFFER_BYTE_ALIGNMENT 256u

Definition at line 163 of file xma2defs.h.

#define XMA_WRITEBUFFER_MAX_BYTES (31u * 256u)

Definition at line 160 of file xma2defs.h.

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

Referenced by LocalizeXma2Format().

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

Referenced by LocalizeXma2Format().

## Typedef Documentation

typedef struct XMA2WAVEFORMATEX * PXMA2WAVEFORMATEX

typedef struct XMA2PACKET XMA2PACKET

typedef struct XMA2STREAMFORMAT XMA2STREAMFORMAT

typedef struct XMA2WAVEFORMAT XMA2WAVEFORMAT

typedef struct XMA2WAVEFORMATEX XMA2WAVEFORMATEX

typedef struct XMASTREAMFORMAT XMASTREAMFORMAT

typedef struct XMAWAVEFORMAT XMAWAVEFORMAT

## Function Documentation

__inline DWORD GetLastXmaFrameBitPosition | ( | __in_bcount(nXmaDataBytes) const BYTE * | pXmaData,
|  | DWORD | nXmaDataBytes,
|  | DWORD | nStreamIndex
| ) |  |

Definition at line 531 of file xma2defs.h.

References DWORD(), GetXmaFrameLengthInBits(), GetXmaPacketFirstFrameOffsetInBits(), GetXmaPacketFrameCount(), GetXmaPacketSkipCount(), XMA2DEFS_ASSERT, XMA_BYTES_PER_PACKET, and XMA_PACKET_HEADER_BITS.

__inline DWORD GetStandardChannelMaskFromXmaMask | ( | BYTE | bXmaMask | ) |

Definition at line 643 of file xma2defs.h.

References DWORD(), SPEAKER_BACK_LEFT, SPEAKER_BACK_RIGHT, SPEAKER_FRONT_CENTER, SPEAKER_FRONT_LEFT, SPEAKER_FRONT_RIGHT, SPEAKER_LOW_FREQUENCY, SPEAKER_SIDE_LEFT, SPEAKER_SIDE_RIGHT, XMA_SPEAKER_CENTER, XMA_SPEAKER_LEFT, XMA_SPEAKER_LEFT_BACK, XMA_SPEAKER_LEFT_SURROUND, XMA_SPEAKER_LFE, XMA_SPEAKER_RIGHT, XMA_SPEAKER_RIGHT_BACK, and XMA_SPEAKER_RIGHT_SURROUND.

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

Definition at line 402 of file xma2defs.h.

References DWORD(), and XMA2DEFS_ASSERT.

__inline BYTE GetXmaChannelMaskFromStandardMask | ( | DWORD | dwStandardMask | ) |

Definition at line 659 of file xma2defs.h.

References SPEAKER_BACK_LEFT, SPEAKER_BACK_RIGHT, SPEAKER_FRONT_CENTER, SPEAKER_FRONT_LEFT, SPEAKER_FRONT_RIGHT, SPEAKER_LOW_FREQUENCY, SPEAKER_SIDE_LEFT, SPEAKER_SIDE_RIGHT, XMA_SPEAKER_CENTER, XMA_SPEAKER_LEFT, XMA_SPEAKER_LEFT_BACK, XMA_SPEAKER_LEFT_SURROUND, XMA_SPEAKER_LFE, XMA_SPEAKER_RIGHT, XMA_SPEAKER_RIGHT_BACK, and XMA_SPEAKER_RIGHT_SURROUND.

__inline HRESULT GetXmaDecodePositionForSample | ( | __in_bcount(nXmaDataBytes) const BYTE * | pXmaData,
|  | DWORD | nXmaDataBytes,
|  | DWORD | nStreamIndex,
|  | DWORD | nDesiredSample,
|  | __out DWORD * | pnBitOffset,
|  | __out DWORD * | pnSubFrame
| ) |  |

Definition at line 593 of file xma2defs.h.

References DWORD(), GetXmaFrameBitPosition(), XMA2DEFS_ASSERT, XMA_SAMPLES_PER_FRAME, and XMA_SAMPLES_PER_SUBFRAME.

__inline DWORD GetXmaFrameBitPosition | ( | __in_bcount(nXmaDataBytes) const BYTE * | pXmaData,
|  | DWORD | nXmaDataBytes,
|  | DWORD | nStreamIndex,
|  | DWORD | nDesiredFrame
| ) |  |

Definition at line 467 of file xma2defs.h.

References DWORD(), GetXmaFrameLengthInBits(), GetXmaPacketFirstFrameOffsetInBits(), GetXmaPacketFrameCount(), GetXmaPacketSkipCount(), XMA2DEFS_ASSERT, XMA_BYTES_PER_PACKET, and XMA_PACKET_HEADER_BITS.

Referenced by GetXmaDecodePositionForSample().

__inline DWORD GetXmaFrameLengthInBits | ( | __in const BYTE * | pPacket,
|  | DWORD | nBitPosition
| ) |  |

Definition at line 437 of file xma2defs.h.

References DWORD().

Referenced by GetLastXmaFrameBitPosition(), and GetXmaFrameBitPosition().

__inline DWORD GetXmaPacketFirstFrameOffsetInBits | ( | __in_bcount(3) const BYTE * | pPacket | ) |

Definition at line 340 of file xma2defs.h.

References DWORD().

Referenced by GetLastXmaFrameBitPosition(), and GetXmaFrameBitPosition().

__inline DWORD GetXmaPacketFrameCount | ( | __in_bcount(1) const BYTE * | pPacket | ) |

Definition at line 335 of file xma2defs.h.

References DWORD().

Referenced by GetLastXmaFrameBitPosition(), and GetXmaFrameBitPosition().

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

Definition at line 347 of file xma2defs.h.

References DWORD().

__inline DWORD GetXmaPacketSkipCount | ( | __in_bcount(4) const BYTE * | pPacket | ) |

Definition at line 352 of file xma2defs.h.

References DWORD().

Referenced by GetLastXmaFrameBitPosition(), and GetXmaFrameBitPosition().

__inline DWORD GetXmaSampleRate | ( | DWORD | dwGeneralRate | ) |

Definition at line 626 of file xma2defs.h.

References DWORD().

__inline HRESULT LocalizeXma2Format | ( | __inout XMA2WAVEFORMATEX * | pXma2Format | ) |

Definition at line 679 of file xma2defs.h.

References WAVE_FORMAT_XMA2, XMASWAP2BYTES, and XMASWAP4BYTES.