/* * Copyright (c) 2018-2023, the SerenityOS developers. * Copyright (c) 2023, kleines Filmröllchen * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include // RIFF chunks (as often used by Microsoft's older formats) use little-endian fields. namespace RIFF { static constexpr StringView const riff_magic = "RIFF"sv; static constexpr StringView const list_chunk_id = "LIST"sv; using WordType = LittleEndian; using ChunkHeader = RIFF::Detail::ChunkHeader; using FileHeader = RIFF::Detail::FileHeader; using Chunk = RIFF::Detail::Chunk; using OwnedChunk = RIFF::Detail::OwnedChunk; // http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/riffmci.pdf page 23 (LIST type) struct OwnedList { static ErrorOr read_from_stream(Stream& stream); ChunkID type; Vector chunks; }; }