fixup decoder constructors

This commit is contained in:
Silent 2017-05-14 00:29:45 +02:00
parent 71cfde4d8e
commit 64168d3301
2 changed files with 9 additions and 10 deletions

View file

@ -5,11 +5,11 @@
class CAEFLACDecoder : public CAEStreamingDecoder class CAEFLACDecoder : public CAEStreamingDecoder
{ {
private: private:
FLAC__StreamDecoder* m_FLACdecoder; FLAC__StreamDecoder* m_FLACdecoder = nullptr;
FLAC__StreamMetadata* m_streamMeta; FLAC__StreamMetadata* m_streamMeta = nullptr;
FLAC__uint64 m_currentSample; FLAC__uint64 m_currentSample;
FLAC__int32* m_buffer; FLAC__int32* m_buffer = nullptr;
size_t m_curBlockSize, m_maxBlockSize; size_t m_curBlockSize, m_maxBlockSize = 0;
size_t m_bufferCursor; size_t m_bufferCursor;
bool m_eof; bool m_eof;
@ -25,11 +25,10 @@ private:
public: public:
CAEFLACDecoder(CAEDataStream* stream) CAEFLACDecoder(CAEDataStream* stream)
: CAEStreamingDecoder(stream), m_FLACdecoder(nullptr), m_streamMeta(nullptr) : CAEStreamingDecoder(stream)
, m_buffer(nullptr), m_curBlockSize(0), m_maxBlockSize(0), m_bufferCursor(0)
{} {}
virtual ~CAEFLACDecoder(); virtual ~CAEFLACDecoder() override;
virtual bool Initialise() override; virtual bool Initialise() override;
virtual uint32_t FillBuffer(void* pBuf, uint32_t nLen) override; virtual uint32_t FillBuffer(void* pBuf, uint32_t nLen) override;
virtual uint32_t GetStreamLengthMs() override virtual uint32_t GetStreamLengthMs() override

View file

@ -7,8 +7,8 @@ class CAEWaveDecoder : public CAEStreamingDecoder
private: private:
uint32_t m_dataSize; uint32_t m_dataSize;
uint32_t m_offsetToData; uint32_t m_offsetToData;
size_t m_maxBlockSize; size_t m_maxBlockSize = 0;
void* m_buffer; void* m_buffer = nullptr;
struct FormatChunk struct FormatChunk
{ {
@ -22,7 +22,7 @@ private:
public: public:
CAEWaveDecoder(CAEDataStream* stream) CAEWaveDecoder(CAEDataStream* stream)
: CAEStreamingDecoder(stream), m_buffer(nullptr), m_maxBlockSize(0) : CAEStreamingDecoder(stream)
{} {}
virtual ~CAEWaveDecoder() override virtual ~CAEWaveDecoder() override