| 1 |
/* SPDX-License-Identifier: BSL-1.0 OR BSD-3-Clause */ |
| 2 |
|
| 3 |
#ifndef MPT_AUDIO_SAMPLE_HPP |
| 4 |
#define MPT_AUDIO_SAMPLE_HPP |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#include "mpt/base/float.hpp" |
| 9 |
#include "mpt/base/integer.hpp" |
| 10 |
#include "mpt/base/namespace.hpp" |
| 11 |
|
| 12 |
#include <type_traits> |
| 13 |
|
| 14 |
#include <cstddef> |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
namespace mpt { |
| 19 |
inline namespace MPT_INLINE_NS { |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
using audio_sample_int = int16; |
| 24 |
using audio_sample_float = nativefloat; |
| 25 |
|
| 26 |
using audio_sample = std::conditional<mpt::float_traits<audio_sample_float>::is_hard, audio_sample_float, audio_sample_int>::type; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
} // namespace MPT_INLINE_NS |
| 31 |
} // namespace mpt |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
#endif // MPT_BINARY_HEX_HPP |