diff options
author | Chris Robinson <[email protected]> | 2019-03-31 22:27:56 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-03-31 22:27:56 -0700 |
commit | 0e0e85af72f855627ca043e234949593ff947caf (patch) | |
tree | 4262b2fc2f43e06b52aff0a6563f8aacdc1c626a /Alc/bformatdec.h | |
parent | 423333c59455a7cc2ca3cee49e8a4643bc0298c5 (diff) |
Don't bother with a separate reset method for BFormatDec
Diffstat (limited to 'Alc/bformatdec.h')
-rw-r--r-- | Alc/bformatdec.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Alc/bformatdec.h b/Alc/bformatdec.h index 7dc283f7..d82f08ac 100644 --- a/Alc/bformatdec.h +++ b/Alc/bformatdec.h @@ -17,29 +17,28 @@ class BFormatDec { static constexpr size_t sLFBand{1}; static constexpr size_t sNumBands{2}; - ALuint mEnabled; /* Bitfield of enabled channels. */ + ALuint mEnabled{0u}; /* Bitfield of enabled channels. */ union MatrixU { ALfloat Dual[MAX_OUTPUT_CHANNELS][sNumBands][MAX_AMBI_CHANNELS]; ALfloat Single[MAX_OUTPUT_CHANNELS][MAX_AMBI_CHANNELS]; - } mMatrix; + } mMatrix{}; /* NOTE: BandSplitter filters are unused with single-band decoding */ BandSplitter mXOver[MAX_AMBI_CHANNELS]; al::vector<std::array<ALfloat,BUFFERSIZE>, 16> mSamples; /* These two alias into Samples */ - std::array<ALfloat,BUFFERSIZE> *mSamplesHF; - std::array<ALfloat,BUFFERSIZE> *mSamplesLF; + std::array<ALfloat,BUFFERSIZE> *mSamplesHF{nullptr}; + std::array<ALfloat,BUFFERSIZE> *mSamplesLF{nullptr}; - ALsizei mNumChannels; - ALboolean mDualBand; + ALsizei mNumChannels{0}; + bool mDualBand{false}; public: - void reset(const AmbDecConf *conf, const bool allow_2band, const ALsizei inchans, + BFormatDec(const AmbDecConf *conf, const bool allow_2band, const ALsizei inchans, const ALuint srate, const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS]); - - void reset(const ALsizei inchans, const ALsizei chancount, + BFormatDec(const ALsizei inchans, const ALsizei chancount, const ChannelDec (&chancoeffs)[MAX_OUTPUT_CHANNELS], const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS]); |