diff options
author | Chris Robinson <[email protected]> | 2023-02-12 05:36:27 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-02-12 05:36:27 -0800 |
commit | b22f9410dde0da5b3795ba62f1a728590238349e (patch) | |
tree | a6f67909890958797ccc7ecd21674dc256045d09 /core | |
parent | ac28273166eb1ba8608a90ccaa10b62d2251f5a3 (diff) |
Explicitly cast a constexpr value to passify MSVC
Diffstat (limited to 'core')
-rw-r--r-- | core/voice.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/voice.cpp b/core/voice.cpp index a927f36b..31fe4088 100644 --- a/core/voice.cpp +++ b/core/voice.cpp @@ -551,6 +551,9 @@ void Voice::mix(const State vstate, ContextBase *Context, const nanoseconds devi : MixingSamples.size()}; for(size_t chan{0};chan < realChannels;++chan) { + using ResBufType = decltype(DeviceBase::mResampleData); + static constexpr uint srcSizeMax{static_cast<uint>(ResBufType{}.size()-MaxResamplerEdge)}; + const auto prevSamples = al::as_span(mPrevSamples[chan]); const auto resampleBuffer = std::copy(prevSamples.cbegin(), prevSamples.cend(), Device->mResampleData.begin()) - MaxResamplerEdge; @@ -563,9 +566,6 @@ void Voice::mix(const State vstate, ContextBase *Context, const nanoseconds devi */ for(uint samplesLoaded{0};samplesLoaded < samplesToLoad;) { - using ResampleBufferType = decltype(DeviceBase::mResampleData); - static constexpr uint srcSizeMax{ResampleBufferType{}.size() - MaxResamplerEdge}; - /* Calculate the number of dst samples that can be loaded this * iteration, given the available resampler buffer size. */ |