URY playd
C++ minimalist audio player
sample_formats.cpp
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 #include <array>
11 #include <cstddef>
12 
13 #include "sample_formats.hpp"
14 
15 const std::array<std::size_t, SAMPLE_FORMAT_COUNT> SAMPLE_FORMAT_BPS {{
16  1, // PACKED_UNSIGNED_INT_8
17  1, // PACKED_SIGNED_INT_8
18  2, // PACKED_SIGNED_INT_16
19  4, // PACKED_SIGNED_INT_32
20  4 // PACKED_FLOAT_32
21 }};
const std::array< std::size_t, SAMPLE_FORMAT_COUNT > SAMPLE_FORMAT_BPS
Map from SampleFormats to bytes-per-mono-sample.
The SampleFormat enumeration and related declarations.