| 39 | } |
| 40 | |
| 41 | int16_t floatToInt16(float sample) |
| 42 | { |
| 43 | const float clamped = std::clamp(finiteOrZero(sample), -1.0f, 1.0f); |
| 44 | return static_cast<int16_t>(std::clamp(static_cast<int>(clamped * 32767.0f), |
| 45 | -32768, |
| 46 | 32767)); |
| 47 | } |
| 48 | |
| 49 | ChannelMode resolveManualMode(ChannelMode requested) |
| 50 | { |
no test coverage detected