WavTypes.h 747 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2023, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/StringView.h>
  8. namespace Audio::Wav {
  9. static constexpr StringView const wave_subformat_id = "WAVE"sv;
  10. static constexpr StringView const data_chunk_id = "data"sv;
  11. static constexpr StringView const info_chunk_id = "INFO"sv;
  12. static constexpr StringView const format_chunk_id = "fmt "sv;
  13. // Constants for handling WAVE header data.
  14. enum class WaveFormat : u32 {
  15. Pcm = 0x0001, // WAVE_FORMAT_PCM
  16. IEEEFloat = 0x0003, // WAVE_FORMAT_IEEE_FLOAT
  17. ALaw = 0x0006, // 8-bit ITU-T G.711 A-law
  18. MuLaw = 0x0007, // 8-bit ITU-T G.711 µ-law
  19. Extensible = 0xFFFE, // Determined by SubFormat
  20. };
  21. }