| 1494 | //============================================================= |
| 1495 | template <class T> |
| 1496 | T AudioSampleConverter<T>::unsignedByteToSample (uint8_t sample) |
| 1497 | { |
| 1498 | if constexpr (std::is_floating_point<T>::value) |
| 1499 | { |
| 1500 | return static_cast<T> (sample - 128) / static_cast<T> (127.); |
| 1501 | } |
| 1502 | else if (std::numeric_limits<T>::is_integer) |
| 1503 | { |
| 1504 | if constexpr (std::is_unsigned_v<T>) |
| 1505 | return static_cast<T> (sample); |
| 1506 | else |
| 1507 | return static_cast<T> (sample - 128); |
| 1508 | } |
| 1509 | } |
| 1510 | |
| 1511 | //============================================================= |
| 1512 | template <class T> |
nothing calls this directly
no outgoing calls
no test coverage detected