diff options
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); |