mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-17 16:28:06 +03:00
d125d16287
This splits the RIFFTypes header/TU into the WAV specific parts, which move to WavTypes.h, as well as the general RIFF parts which move to the new LibRIFF. Sidenote for the spec comments: even though they are linked from a site that explains the WAV format, the document is the (an) overall RIFF spec from Microsoft. A better source may be used later; the changes to the header are as minimal as possible.
28 lines
747 B
C++
28 lines
747 B
C++
/*
|
|
* Copyright (c) 2023, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/StringView.h>
|
|
|
|
namespace Audio::Wav {
|
|
|
|
static constexpr StringView const wave_subformat_id = "WAVE"sv;
|
|
static constexpr StringView const data_chunk_id = "data"sv;
|
|
static constexpr StringView const info_chunk_id = "INFO"sv;
|
|
static constexpr StringView const format_chunk_id = "fmt "sv;
|
|
|
|
// Constants for handling WAVE header data.
|
|
enum class WaveFormat : u32 {
|
|
Pcm = 0x0001, // WAVE_FORMAT_PCM
|
|
IEEEFloat = 0x0003, // WAVE_FORMAT_IEEE_FLOAT
|
|
ALaw = 0x0006, // 8-bit ITU-T G.711 A-law
|
|
MuLaw = 0x0007, // 8-bit ITU-T G.711 µ-law
|
|
Extensible = 0xFFFE, // Determined by SubFormat
|
|
};
|
|
|
|
}
|