Wwise SDK 2022.1.8
Go to the documentation of this file.
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
5 Commercial License Usage
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
12 Apache License Usage
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
24  Copyright (c) 2023 Audiokinetic Inc.
25 *******************************************************************************/
27 #pragma once
29 /// \file
30 /// Basic definitions for WAV / WEM file parsers.
35 //-----------------------------------------------------------------------------
36 // Constants.
37 //-----------------------------------------------------------------------------
39 // Standard IDs
40 constexpr AkFourcc RIFXChunkId = AkmmioFOURCC('R', 'I', 'F', 'X');
41 constexpr AkFourcc RIFFChunkId = AkmmioFOURCC('R', 'I', 'F', 'F');
42 constexpr AkFourcc WAVEChunkId = AkmmioFOURCC('W', 'A', 'V', 'E');
43 constexpr AkFourcc OGGSChunkId = AkmmioFOURCC('O', 'g', 'g', 'S');
44 constexpr AkFourcc fmtChunkId = AkmmioFOURCC('f', 'm', 't', ' ');
45 constexpr AkFourcc dataChunkId = AkmmioFOURCC('d', 'a', 't', 'a');
46 constexpr AkFourcc cueChunkId = AkmmioFOURCC('c', 'u', 'e', ' ');
47 constexpr AkFourcc LISTChunkId = AkmmioFOURCC('L', 'I', 'S', 'T');
48 constexpr AkFourcc adtlChunkId = AkmmioFOURCC('a', 'd', 't', 'l');
49 constexpr AkFourcc lablChunkId = AkmmioFOURCC('l', 'a', 'b', 'l');
50 constexpr AkFourcc smplChunkId = AkmmioFOURCC('s', 'm', 'p', 'l');
51 constexpr AkFourcc junkChunkId = AkmmioFOURCC('j', 'u', 'n', 'k');
53 // AK-specific IDs
54 constexpr AkFourcc akdChunkId = AkmmioFOURCC('a', 'k', 'd', ' ');
55 constexpr AkFourcc hashChunkId = AkmmioFOURCC('h', 'a', 's', 'h');
56 constexpr AkFourcc seekChunkId = AkmmioFOURCC('s', 'e', 'e', 'k');
57 constexpr AkFourcc irmdChunkId = AkmmioFOURCC('i', 'r', 'm', 'd');
59 //-----------------------------------------------------------------------------
60 // Structs.
61 //-----------------------------------------------------------------------------
63 #pragma pack(push, 1)
65 /// Standard WAV chunk header
67 {
70 };
72 /// Standard WAV format header
73 struct WaveFormatEx
74 {
81  AkUInt16 cbSize; // size of extra chunk of data, after end of this struct
82 };
84 /// WEM format header: equivalent to WAVEFORMATEXTENSIBLE, with an AkChannelConfig
85 /// instead of dwChannelMask+SubFormat. Codecs that require format-specific chunks
86 /// should extend this structure.
88 {
90  AkUInt32 uChannelConfig; // Serialized AkChannelConfig
93  {
94  AkChannelConfig channelConfig;
95  channelConfig.Deserialize(uChannelConfig);
96  return channelConfig;
97  }
98 };
99 static_assert(sizeof(WaveFormatExtensible) == 24, "Incorrect padding for WaveFormatExtensible");
101 #pragma pack(pop)
AkUInt16 nBlockAlign
Definition: AkWavDefs.h:79
uint16_t AkUInt16
Unsigned 16-bit integer.
Definition: AkNumeralTypes.h:37
constexpr AkFourcc fmtChunkId
Definition: AkWavDefs.h:44
constexpr AkFourcc hashChunkId
Definition: AkWavDefs.h:55
constexpr AkFourcc dataChunkId
Definition: AkWavDefs.h:45
AkUInt16 wBitsPerSample
Definition: AkWavDefs.h:80
AkUInt16 nChannels
Definition: AkWavDefs.h:76
constexpr AkFourcc cueChunkId
Definition: AkWavDefs.h:46
AkUInt16 wFormatTag
Definition: AkWavDefs.h:75
constexpr AkFourcc OGGSChunkId
Definition: AkWavDefs.h:43
AkUInt16 wSamplesPerBlock
Definition: AkWavDefs.h:89
AkUInt32 nAvgBytesPerSec
Definition: AkWavDefs.h:78
constexpr AkFourcc junkChunkId
Definition: AkWavDefs.h:51
constexpr AkFourcc RIFXChunkId
Definition: AkWavDefs.h:40
constexpr AkFourcc RIFFChunkId
Definition: AkWavDefs.h:41
AkUInt32 uChannelConfig
Definition: AkWavDefs.h:90
constexpr AkFourcc irmdChunkId
Definition: AkWavDefs.h:57
AkUInt32 dwChunkSize
Definition: AkWavDefs.h:69
constexpr AkFourcc smplChunkId
Definition: AkWavDefs.h:50
constexpr AkFourcc WAVEChunkId
Definition: AkWavDefs.h:42
Standard WAV format header.
Definition: AkWavDefs.h:74
constexpr AkFourcc LISTChunkId
Definition: AkWavDefs.h:47
Standard WAV chunk header.
Definition: AkWavDefs.h:67
constexpr AkFourcc akdChunkId
Definition: AkWavDefs.h:54
AkFourcc ChunkId
Definition: AkWavDefs.h:68
AkUInt16 cbSize
Definition: AkWavDefs.h:81
constexpr AkFourcc seekChunkId
Definition: AkWavDefs.h:56
constexpr AkFourcc lablChunkId
Definition: AkWavDefs.h:49
AkUInt32 nSamplesPerSec
Definition: AkWavDefs.h:77
uint32_t AkUInt32
Unsigned 32-bit integer.
Definition: AkNumeralTypes.h:38
#define AkmmioFOURCC(ch0, ch1, ch2, ch3)
Create Riff chunk.
Definition: AkTypes.h:87
AkUInt32 AkFourcc
Riff chunk.
Definition: AkTypes.h:84
constexpr AkFourcc adtlChunkId
Definition: AkWavDefs.h:48
AkChannelConfig GetChannelConfig() const
Definition: AkWavDefs.h:92
AkForceInline void Deserialize(AkUInt32 in_uChannelConfig)
Deserialize channel config from a 32-bit word.
Definition: AkSpeakerConfig.h:630

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise