aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp
index bdc7e878..afb63c6d 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -3111,7 +3111,8 @@ START_API_FUNC
const ALuint count{DoubleValsByProp(param)};
float fvals[MaxValues];
- std::copy_n(values, count, fvals);
+ std::transform(values, values+count, fvals,
+ [](const double d) noexcept -> float { return static_cast<float>(d); });
SetSourcefv(Source, context.get(), static_cast<SourceProp>(param), {fvals, count});
}
END_API_FUNC
@@ -3289,7 +3290,8 @@ START_API_FUNC
const ALuint count{FloatValsByProp(param)};
double dvals[MaxValues];
if(GetSourcedv(Source, context.get(), static_cast<SourceProp>(param), {dvals, count}))
- std::copy_n(dvals, count, values);
+ std::transform(dvals, dvals+count, values,
+ [](const double d) noexcept -> float { return static_cast<float>(d); });
}
END_API_FUNC