mirror of
https://github.com/ZDoom/ZMusic.git
synced 2024-11-15 00:41:36 +00:00
- fixed uninitialized variables in decoders.
This commit is contained in:
parent
dc214dbdd6
commit
7f63ad8707
2 changed files with 5 additions and 7 deletions
|
@ -25,17 +25,16 @@ struct MPG123Decoder : public SoundDecoder
|
|||
virtual size_t getSampleOffset() override;
|
||||
virtual size_t getSampleLength() override;
|
||||
|
||||
MPG123Decoder() : MPG123(0) { }
|
||||
virtual ~MPG123Decoder();
|
||||
|
||||
protected:
|
||||
virtual bool open(MusicIO::FileInterface *reader) override;
|
||||
|
||||
private:
|
||||
mpg123_handle *MPG123;
|
||||
bool Done;
|
||||
mpg123_handle *MPG123 = nullptr;
|
||||
bool Done = false;
|
||||
MusicIO::FileInterface* Reader = nullptr;
|
||||
|
||||
MusicIO::FileInterface* Reader;
|
||||
static off_t file_lseek(void *handle, off_t offset, int whence);
|
||||
static ssize_t file_read(void *handle, void *buffer, size_t bytes);
|
||||
|
||||
|
|
|
@ -21,17 +21,16 @@ struct SndFileDecoder : public SoundDecoder
|
|||
virtual size_t getSampleOffset() override;
|
||||
virtual size_t getSampleLength() override;
|
||||
|
||||
SndFileDecoder() : SndFile(0) { }
|
||||
virtual ~SndFileDecoder();
|
||||
|
||||
protected:
|
||||
virtual bool open(MusicIO::FileInterface *reader) override;
|
||||
|
||||
private:
|
||||
SNDFILE *SndFile;
|
||||
SNDFILE *SndFile = nullptr;
|
||||
SF_INFO SndInfo;
|
||||
MusicIO::FileInterface* Reader = nullptr;
|
||||
|
||||
MusicIO::FileInterface* Reader;
|
||||
static sf_count_t file_get_filelen(void *user_data);
|
||||
static sf_count_t file_seek(sf_count_t offset, int whence, void *user_data);
|
||||
static sf_count_t file_read(void *ptr, sf_count_t count, void *user_data);
|
||||
|
|
Loading…
Reference in a new issue