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 {
31
PACKED_UNSIGNED_INT_8
,
32
PACKED_SIGNED_INT_8
,
33
PACKED_SIGNED_INT_16
,
34
PACKED_SIGNED_INT_32
,
35
PACKED_FLOAT_32
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
SAMPLE_FORMAT_BPS
const std::array< std::size_t, SAMPLE_FORMAT_COUNT > SAMPLE_FORMAT_BPS
Map from SampleFormats to bytes-per-mono-sample.
Definition:
sample_formats.cpp:15
SampleFormat::PACKED_UNSIGNED_INT_8
Packed 8-bit unsigned integer.
SampleFormat::PACKED_SIGNED_INT_16
Packed 16-bit signed integer.
SampleFormat::PACKED_SIGNED_INT_32
Packed 32-bit signed integer.
SampleFormat::PACKED_SIGNED_INT_8
Packed 8-bit signed integer.
SAMPLE_FORMAT_COUNT
constexpr std::size_t SAMPLE_FORMAT_COUNT
Number of sample formats available; should agree with SampleFormat.
Definition:
sample_formats.hpp:39
SampleFormat
SampleFormat
Sample formats available in playd.
Definition:
sample_formats.hpp:30
SampleFormat::PACKED_FLOAT_32
Packed 32-bit floating point.
src
audio
sample_formats.hpp
Generated on Mon Sep 12 2016 22:53:02 for URY playd by
1.8.12