aboutsummaryrefslogtreecommitdiffstats
path: root/alc/converter.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-10-05 22:30:23 -0700
committerChris Robinson <[email protected]>2020-10-05 22:30:23 -0700
commit7fb6d64ca81d68f74a254c097d511d8863453000 (patch)
tree7393463f07febc1fd0d31c50bc62d18b90774518 /alc/converter.h
parente7a44d3b7063553fa54e743a4fac116d130fbe1d (diff)
Be more robust with to-mono channel conversions
Diffstat (limited to 'alc/converter.h')
-rw-r--r--alc/converter.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/alc/converter.h b/alc/converter.h
index b3ceea9a..17da3aae 100644
--- a/alc/converter.h
+++ b/alc/converter.h
@@ -49,11 +49,12 @@ SampleConverterPtr CreateSampleConverter(DevFmtType srcType, DevFmtType dstType,
struct ChannelConverter {
- DevFmtType mSrcType;
- DevFmtChannels mSrcChans;
- DevFmtChannels mDstChans;
+ DevFmtType mSrcType{};
+ ALuint mSrcStep{};
+ ALuint mChanMask{};
+ DevFmtChannels mDstChans{};
- bool is_active() const noexcept { return mSrcChans != mDstChans; }
+ bool is_active() const noexcept { return mChanMask != 0; }
void convert(const void *src, float *dst, ALuint frames) const;
};