SampleFormats.h 544 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/DeprecatedString.h>
  8. #include <AK/Types.h>
  9. namespace Audio {
  10. // Supported PCM sample formats.
  11. enum class PcmSampleFormat : u8 {
  12. Uint8,
  13. Int16,
  14. Int24,
  15. Int32,
  16. Float32,
  17. Float64,
  18. };
  19. // Most of the read code only cares about how many bits to read or write
  20. u16 pcm_bits_per_sample(PcmSampleFormat format);
  21. DeprecatedString sample_format_name(PcmSampleFormat format);
  22. }