URY playd
C++ minimalist audio player
sample_formats.hpp
Go to the documentation of this file.
1 // This file is part of playd.
2 // playd is licensed under the MIT licence: see LICENSE.txt.
3 
10 #ifndef PLAYD_SAMPLE_FORMATS_HPP
11 #define PLAYD_SAMPLE_FORMATS_HPP
12 
13 #include <array>
14 #include <cstdint>
15 
30 enum class SampleFormat : std::uint8_t {
36 };
37 
39 constexpr std::size_t SAMPLE_FORMAT_COUNT = 5;
40 
42 extern const std::array<std::size_t, SAMPLE_FORMAT_COUNT> SAMPLE_FORMAT_BPS;
43 
44 #endif // PLAYD_SAMPLE_FORMATS_HPP
const std::array< std::size_t, SAMPLE_FORMAT_COUNT > SAMPLE_FORMAT_BPS
Map from SampleFormats to bytes-per-mono-sample.
Packed 8-bit unsigned integer.
Packed 16-bit signed integer.
Packed 32-bit signed integer.
Packed 8-bit signed integer.
constexpr std::size_t SAMPLE_FORMAT_COUNT
Number of sample formats available; should agree with SampleFormat.
SampleFormat
Sample formats available in playd.
Packed 32-bit floating point.