| 1338 | //============================================================= |
| 1339 | template <class T> |
| 1340 | T AudioSampleConverter<T>::thirtyTwoBitIntToSample (int32_t sample) |
| 1341 | { |
| 1342 | if constexpr (std::is_floating_point<T>::value) |
| 1343 | { |
| 1344 | return static_cast<T> (sample) / static_cast<T> (std::numeric_limits<int32_t>::max()); |
| 1345 | } |
| 1346 | else if (std::numeric_limits<T>::is_integer) |
| 1347 | { |
| 1348 | if constexpr (std::is_signed_v<T>) |
| 1349 | return static_cast<T> (sample); |
| 1350 | else |
| 1351 | return static_cast<T> (clamp (static_cast<T> (sample + 2147483648), 0, 4294967295)); |
| 1352 | } |
| 1353 | } |
| 1354 | |
| 1355 | //============================================================= |
| 1356 | template <class T> |
nothing calls this directly
no outgoing calls
no test coverage detected