OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
Riff.h
Go to the documentation of this file.
1/*
2 * File: Riff.h
3 *
4 * Description: Resource Interchange File Format format definition.
5 *
6 * Copyright (c) 2018 John Davis
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in all
16 * copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 * SOFTWARE.
25 */
26
27#ifndef EFI_RIFF_H
28#define EFI_RIFF_H
29
34#include <Uefi.h>
35
36//
37// RIFF chunk IDs.
38//
39#define RIFF_CHUNK_ID_SIZE 4
40#define RIFF_CHUNK_ID "RIFF"
41#define LIST_CHUNK_ID "LIST"
42#define PAL_CHUNK_ID "PAL "
43#define RDIB_CHUNK_ID "RDIB"
44#define RMID_CHUNK_ID "RMID"
45#define RMMP_CHUNK_ID "RMMP"
46
47//
48// WAVE chunk IDs.
49//
50#define WAVE_CHUNK_ID "WAVE"
51#define WAVE_CUE_CHUNK_ID "cue "
52#define WAVE_DATA_CHUNK_ID "data"
53#define WAVE_FACT_CHUNK_ID "fact"
54#define WAVE_FILE_CHUNK_ID "file"
55#define WAVE_FORMAT_CHUNK_ID "fmt "
56#define WAVE_LABEL_CHUNK_ID "labl"
57#define WAVE_NOTE_CHUNK_ID "note"
58#define WAVE_PLAYLIST_CHUNK_ID "plst"
59#define WAVE_SILENCE_CHUNK_ID "slnt"
60#define WAVE_TEXT_DATA_CHUNK_ID "ltxt"
61#define WAVE_WAVE_LIST_CHUNK_ID "wavl"
62
63//
64// WAVE format types.
65//
66#define WAVE_FORMAT_PCM 0x0001
67#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
68
69#pragma pack(1)
70
74typedef struct {
76 UINT32 Size;
77 UINT8 Data[];
79
83typedef struct {
84 UINT16 FormatTag;
85 UINT16 Channels;
88 UINT16 BlockAlign;
91
102
103#pragma pack()
104
105#endif // EFI_RIFF_H
#define RIFF_CHUNK_ID_SIZE
Definition Riff.h:39
UINT32 Size
Definition Riff.h:76
UINT16 ExtensionSize
Definition Riff.h:97
WAVE_FORMAT_DATA Header
Definition Riff.h:96
UINT16 ValidBitsPerSample
Definition Riff.h:98
UINT32 ChannelMask
Definition Riff.h:99
UINT16 BitsPerSample
Definition Riff.h:89
UINT16 FormatTag
Definition Riff.h:84
UINT16 Channels
Definition Riff.h:85
UINT16 BlockAlign
Definition Riff.h:88
UINT32 AvgBytesPerSec
Definition Riff.h:87
UINT32 SamplesPerSec
Definition Riff.h:86