| 1422 | //============================================================= |
| 1423 | template <class T> |
| 1424 | T AudioSampleConverter<T>::sixteenBitIntToSample (int16_t sample) |
| 1425 | { |
| 1426 | if constexpr (std::is_floating_point<T>::value) |
| 1427 | { |
| 1428 | return static_cast<T> (sample) / static_cast<T> (32767.); |
| 1429 | } |
| 1430 | else if constexpr (std::numeric_limits<T>::is_integer) |
| 1431 | { |
| 1432 | if constexpr (std::is_signed_v<T>) |
| 1433 | return static_cast<T> (sample); |
| 1434 | else |
| 1435 | return static_cast<T> (convertSignedToUnsigned<int16_t> (sample)); |
| 1436 | } |
| 1437 | } |
| 1438 | |
| 1439 | //============================================================= |
| 1440 | template <class T> |
nothing calls this directly
no outgoing calls
no test coverage detected