| 1387 | //============================================================= |
| 1388 | template <class T> |
| 1389 | T AudioSampleConverter<T>::twentyFourBitIntToSample (int32_t sample) |
| 1390 | { |
| 1391 | if constexpr (std::is_floating_point<T>::value) |
| 1392 | { |
| 1393 | return static_cast<T> (sample) / static_cast<T> (8388607.); |
| 1394 | } |
| 1395 | else if (std::numeric_limits<T>::is_integer) |
| 1396 | { |
| 1397 | if constexpr (std::is_signed_v<T>) |
| 1398 | return static_cast<T> (clamp (sample, SignedInt24_Min, SignedInt24_Max)); |
| 1399 | else |
| 1400 | return static_cast<T> (clamp (sample + 8388608, UnsignedInt24_Min, UnsignedInt24_Max)); |
| 1401 | } |
| 1402 | } |
| 1403 | |
| 1404 | //============================================================= |
| 1405 | template <class T> |
nothing calls this directly
no outgoing calls
no test coverage detected