CommonLibSSE (Parapets fork)
AudioDefs.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace RE
4 {
5 #pragma pack(push, 1)
6 
7  struct tWAVEFORMATEX
8  {
9  std::uint16_t wFormatTag; // 00 - Integer identifier of the format
10  std::uint16_t nChannels; // 02 - Number of audio channels
11  std::uint32_t nSamplesPerSec; // 04 - Audio sample rate
12  std::uint32_t nAvgBytesPerSec; // 08 - Bytes per second (possibly approximate)
13  std::uint16_t nBlockAlign; // 0C - Size in bytes of a sample block (all channels)
14  std::uint16_t wBitsPerSample; // 0E - Size in bits of a single per-channel sample
15  std::uint16_t cbSize; // 10 - Bytes of extra data appended to this struct
16  };
17  static_assert(sizeof(tWAVEFORMATEX) == 0x12);
19 
21  {
22  WAVEFORMATEX Format; // 00 - Base WAVEFORMATEX data
23  union // 12
24  {
25  std::uint16_t wValidBitsPerSample; // Valid bits in each sample container
26  std::uint16_t wSamplesPerBlock; // Samples per block of audio data; valid if wBitsPerSample=0 (but rarely used).
27  std::uint16_t wReserved; // Zero if neither case above applies.
29  std::uint32_t dwChannelMask; // 14 - Positions of the audio channels
30  WinAPI::GUID SubFormat; // 18 - Format identifier GUID
31  };
32 
33 #pragma pack(pop)
34 }
Definition: AbsorbEffect.h:6
Definition: AudioDefs.h:21
std::uint16_t wSamplesPerBlock
Definition: AudioDefs.h:26
union RE::WAVEFORMATEXTENSIBLE::@1 Samples
std::uint16_t wReserved
Definition: AudioDefs.h:27
std::uint32_t dwChannelMask
Definition: AudioDefs.h:29
WAVEFORMATEX Format
Definition: AudioDefs.h:22
std::uint16_t wValidBitsPerSample
Definition: AudioDefs.h:25
WinAPI::GUID SubFormat
Definition: AudioDefs.h:30
Definition: AudioDefs.h:8
std::uint16_t wBitsPerSample
Definition: AudioDefs.h:14
std::uint16_t nChannels
Definition: AudioDefs.h:10
std::uint16_t cbSize
Definition: AudioDefs.h:15
std::uint32_t nSamplesPerSec
Definition: AudioDefs.h:11
std::uint16_t nBlockAlign
Definition: AudioDefs.h:13
std::uint16_t wFormatTag
Definition: AudioDefs.h:9
std::uint32_t nAvgBytesPerSec
Definition: AudioDefs.h:12
Definition: WinAPI.h:90