diff --git a/SilentPatchSA/FLACDecoderSA.h b/SilentPatchSA/FLACDecoderSA.h index 00b61be..9cb4fac 100644 --- a/SilentPatchSA/FLACDecoderSA.h +++ b/SilentPatchSA/FLACDecoderSA.h @@ -5,11 +5,11 @@ class CAEFLACDecoder : public CAEStreamingDecoder { private: - FLAC__StreamDecoder* m_FLACdecoder; - FLAC__StreamMetadata* m_streamMeta; + FLAC__StreamDecoder* m_FLACdecoder = nullptr; + FLAC__StreamMetadata* m_streamMeta = nullptr; FLAC__uint64 m_currentSample; - FLAC__int32* m_buffer; - size_t m_curBlockSize, m_maxBlockSize; + FLAC__int32* m_buffer = nullptr; + size_t m_curBlockSize, m_maxBlockSize = 0; size_t m_bufferCursor; bool m_eof; @@ -25,11 +25,10 @@ private: public: CAEFLACDecoder(CAEDataStream* stream) - : CAEStreamingDecoder(stream), m_FLACdecoder(nullptr), m_streamMeta(nullptr) - , m_buffer(nullptr), m_curBlockSize(0), m_maxBlockSize(0), m_bufferCursor(0) + : CAEStreamingDecoder(stream) {} - virtual ~CAEFLACDecoder(); + virtual ~CAEFLACDecoder() override; virtual bool Initialise() override; virtual uint32_t FillBuffer(void* pBuf, uint32_t nLen) override; virtual uint32_t GetStreamLengthMs() override diff --git a/SilentPatchSA/WaveDecoderSA.h b/SilentPatchSA/WaveDecoderSA.h index 50b29d8..a70fcf1 100644 --- a/SilentPatchSA/WaveDecoderSA.h +++ b/SilentPatchSA/WaveDecoderSA.h @@ -7,8 +7,8 @@ class CAEWaveDecoder : public CAEStreamingDecoder private: uint32_t m_dataSize; uint32_t m_offsetToData; - size_t m_maxBlockSize; - void* m_buffer; + size_t m_maxBlockSize = 0; + void* m_buffer = nullptr; struct FormatChunk { @@ -22,7 +22,7 @@ private: public: CAEWaveDecoder(CAEDataStream* stream) - : CAEStreamingDecoder(stream), m_buffer(nullptr), m_maxBlockSize(0) + : CAEStreamingDecoder(stream) {} virtual ~CAEWaveDecoder() override