-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSVC 2019 build template error. #1024
Comments
What's the error? AFAIK, |
sure
|
And changing just the std::for_each(OutBuffer.begin(), OutBuffer.end(), fill_max); in std::for_each(output.begin(), output.end(), apply_comp); in |
yes I'm using latest git master, and that's all I changed. diff --git a/core/mastering.cpp b/core/mastering.cpp
index b9e8aa50..74fbda67 100644
--- a/core/mastering.cpp
+++ b/core/mastering.cpp
@@ -119,7 +119,8 @@ void Compressor::linkChannels(const uint SamplesToDo,
std::transform(sideChain.begin(), sideChain.end(), buffer.begin(), sideChain.begin(),
max_abs);
};
- std::for_each(OutBuffer.begin(), OutBuffer.end(), fill_max);
+ for (const FloatBufferLine& e : OutBuffer)
+ fill_max(e);
}
/* This calculates the squared crest factor of the control signal for the
@@ -424,7 +425,9 @@ void Compressor::process(const uint SamplesToDo, FloatBufferLine *OutBuffer)
std::transform(gains.cbegin(), gains.cend(), buffer.cbegin(), buffer.begin(),
std::multiplies{});
};
- std::for_each(output.begin(), output.end(), apply_comp);
+
+ for (const FloatBufferSpan input : output)
+ apply_comp(input);
const auto delayedGains = al::span{mSideChain}.subspan(SamplesToDo, mLookAhead);
std::copy(delayedGains.begin(), delayedGains.end(), mSideChain.begin());
``` |
MSVC doesn't like the usage of
std::for_each
inmastering.cpp
, specially the usage inlinkChannels
andCompressor::process
.Replacing the
std::for_each
with a c++11 style range based loop fixes the issue. If c++11 support can be assumed, then replacing the legacystd::for_each
usage with the new syntax is a potential fix.The text was updated successfully, but these errors were encountered: