diff options
author | Chris Robinson <[email protected]> | 2022-11-13 14:13:33 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-11-13 14:13:33 -0800 |
commit | 543660f1a7c03634c6bec184a47dfd7c9845f17f (patch) | |
tree | 4edf908ebf2469c62250b953f290384c28ced911 | |
parent | c45843964bc461cbf5f99ec651bd8c07fbb14b35 (diff) |
Avoid a potential unsigned underflow
-rw-r--r-- | core/converter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/converter.h b/core/converter.h index b6ff3ba5..01becea2 100644 --- a/core/converter.h +++ b/core/converter.h @@ -41,7 +41,7 @@ struct SampleConverter { using SampleOffset = std::chrono::duration<int64_t, std::ratio<1,MixerFracOne>>; SampleOffset currentInputDelay() const noexcept { - const int64_t prep{mSrcPrepCount - MaxResamplerEdge}; + const int64_t prep{int64_t{mSrcPrepCount} - MaxResamplerEdge}; return SampleOffset{(prep<<MixerFracBits) + mFracOffset}; } |