20 #ifndef MPD_PCM_TRAITS_HXX
21 #define MPD_PCM_TRAITS_HXX
34 template<SampleFormat F>
71 static constexpr
size_t SAMPLE_SIZE =
sizeof(value_type);
77 static constexpr
unsigned BITS =
sizeof(value_type) * 8;
82 static constexpr value_type MIN = -(sum_type(1) << (BITS - 1));
87 static constexpr value_type
MAX = (sum_type(1) << (BITS - 1)) - 1;
92 static constexpr value_type SILENCE = 0;
104 static constexpr
size_t SAMPLE_SIZE =
sizeof(value_type);
105 static constexpr
unsigned BITS =
sizeof(value_type) * 8;
107 static constexpr value_type MIN = -(sum_type(1) << (BITS - 1));
108 static constexpr value_type
MAX = (sum_type(1) << (BITS - 1)) - 1;
109 static constexpr value_type SILENCE = 0;
121 static constexpr
size_t SAMPLE_SIZE =
sizeof(value_type);
122 static constexpr
unsigned BITS =
sizeof(value_type) * 8;
124 static constexpr value_type MIN = -(sum_type(1) << (BITS - 1));
125 static constexpr value_type
MAX = (sum_type(1) << (BITS - 1)) - 1;
126 static constexpr value_type SILENCE = 0;
138 static constexpr
size_t SAMPLE_SIZE =
sizeof(value_type);
139 static constexpr
unsigned BITS = 24;
141 static constexpr value_type MIN = -(sum_type(1) << (BITS - 1));
142 static constexpr value_type
MAX = (sum_type(1) << (BITS - 1)) - 1;
143 static constexpr value_type SILENCE = 0;
155 static constexpr
size_t SAMPLE_SIZE =
sizeof(value_type);
157 static constexpr value_type MIN = -1;
158 static constexpr value_type
MAX = 1;
159 static constexpr value_type SILENCE = 0;
168 static constexpr
size_t SAMPLE_SIZE =
sizeof(value_type);
170 static constexpr value_type SILENCE = 0x69;
This template describes the specified SampleFormat.