diff options
author | Chris Robinson <[email protected]> | 2020-12-05 02:44:19 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-05 02:44:19 -0800 |
commit | 2b919eac78cd6ebe07d6ca7cd01450e6f1aea75b (patch) | |
tree | 48fb8a5c4076ceaaff095cdbcee78e229179274a /alc/alu.cpp | |
parent | 16ec07275f68919cc0e4264f917e4fcebcdca039 (diff) |
Use an alias for the DevFmtType type
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r-- | alc/alu.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index fe42b14b..1824a5a9 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -1888,18 +1888,16 @@ template<DevFmtType T> void Write(const al::span<const FloatBufferLine> InBuffer, void *OutBuffer, const size_t Offset, const size_t SamplesToDo, const size_t FrameStep) { - using SampleType = typename DevFmtTypeTraits<T>::Type; - ASSUME(FrameStep > 0); ASSUME(SamplesToDo > 0); - SampleType *outbase = static_cast<SampleType*>(OutBuffer) + Offset*FrameStep; + DevFmtType_t<T> *outbase = static_cast<DevFmtType_t<T>*>(OutBuffer) + Offset*FrameStep; for(const FloatBufferLine &inbuf : InBuffer) { - SampleType *out{outbase++}; + DevFmtType_t<T> *out{outbase++}; auto conv_sample = [FrameStep,&out](const float s) noexcept -> void { - *out = SampleConv<SampleType>(s); + *out = SampleConv<DevFmtType_t<T>>(s); out += FrameStep; }; std::for_each(inbuf.begin(), inbuf.begin()+SamplesToDo, conv_sample); |