ladybird/Userland/Libraries/LibAudio/WavTypes.h
kleines Filmröllchen d125d16287 LibAudio+LibRIFF: Move general RIFF handling to LibRIFF
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.
2024-01-15 23:23:26 -07:00

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
};
}