diff options
author | Chris Robinson <[email protected]> | 2018-12-01 11:28:11 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-01 11:28:11 -0800 |
commit | 255c07def9814b1c07196983a0a670dccccc0d50 (patch) | |
tree | 7dabcb65650b65528dd73c3d9f25e6faabf123bd /Alc/converter.h | |
parent | cc161fe7c12182ebca3a49a380c4c60ebb1afb5f (diff) |
Try to pacify MSVC's missing a suitable default constructor
Diffstat (limited to 'Alc/converter.h')
-rw-r--r-- | Alc/converter.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/Alc/converter.h b/Alc/converter.h index e0aeb7d4..7444d4fa 100644 --- a/Alc/converter.h +++ b/Alc/converter.h @@ -6,21 +6,21 @@ #include "almalloc.h" struct SampleConverter { - enum DevFmtType mSrcType; - enum DevFmtType mDstType; - ALsizei mNumChannels; - ALsizei mSrcTypeSize; - ALsizei mDstTypeSize; + DevFmtType mSrcType{}; + DevFmtType mDstType{}; + ALsizei mNumChannels{}; + ALsizei mSrcTypeSize{}; + ALsizei mDstTypeSize{}; - ALint mSrcPrepCount; + ALint mSrcPrepCount{}; - ALsizei mFracOffset; - ALsizei mIncrement; - InterpState mState; - ResamplerFunc mResample; + ALsizei mFracOffset{}; + ALsizei mIncrement{}; + InterpState mState{}; + ResamplerFunc mResample{}; - alignas(16) ALfloat mSrcSamples[BUFFERSIZE]; - alignas(16) ALfloat mDstSamples[BUFFERSIZE]; + alignas(16) ALfloat mSrcSamples[BUFFERSIZE]{}; + alignas(16) ALfloat mDstSamples[BUFFERSIZE]{}; struct { alignas(16) ALfloat mPrevSamples[MAX_RESAMPLE_PADDING*2]; @@ -39,11 +39,14 @@ ALsizei SampleConverterAvailableOut(SampleConverter *converter, ALsizei srcframe struct ChannelConverter { - enum DevFmtType mSrcType; - enum DevFmtChannels mSrcChans; - enum DevFmtChannels mDstChans; - - DEF_PLACE_NEWDEL() + DevFmtType mSrcType; + DevFmtChannels mSrcChans; + DevFmtChannels mDstChans; + + ChannelConverter(DevFmtType srctype, DevFmtChannels srcchans, DevFmtChannels dstchans) + : mSrcType(srctype), mSrcChans(srcchans), mDstChans(dstchans) + { } + DEF_NEWDEL(ChannelConverter) }; ChannelConverter *CreateChannelConverter(enum DevFmtType srcType, enum DevFmtChannels srcChans, enum DevFmtChannels dstChans); |