From d2a09cef5f97a95c0d3ac60fabddca79528773c7 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 18 Sep 2003 20:27:31 +0000 Subject: [PATCH] Cleanup. More ADPCM fixes. --- stepmania/src/RageSoundReader_WAV.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/stepmania/src/RageSoundReader_WAV.cpp b/stepmania/src/RageSoundReader_WAV.cpp index e9d79723dd..294c8a96ea 100644 --- a/stepmania/src/RageSoundReader_WAV.cpp +++ b/stepmania/src/RageSoundReader_WAV.cpp @@ -132,12 +132,12 @@ bool RageSoundReader_WAV::read_uint8(FILE *rw, Uint8 *ui8) const RageSoundReader_WAV::adpcm_t::adpcm_t() { - memset( this, 0, sizeof(this) ); + memset( this, 0, sizeof(*this) ); } RageSoundReader_WAV::adpcm_t::adpcm_t( const adpcm_t &cpy ) { - memset( this, 0, sizeof(this) ); + memset( this, 0, sizeof(*this) ); this->cbSize = cpy.cbSize; memcpy( this->blockheaders, cpy.blockheaders, sizeof(this->blockheaders) ); @@ -175,8 +175,6 @@ bool RageSoundReader_WAV::read_fmt_chunk() if( fmt.wFormatTag == FMT_ADPCM ) { - memset(&adpcm, '\0', sizeof (adpcm)); - RETURN_IF_MACRO(!read_le16(rw, &adpcm.cbSize), false); RETURN_IF_MACRO(!read_le16(rw, &adpcm.wSamplesPerBlock), false); RETURN_IF_MACRO(!read_le16(rw, &adpcm.wNumCoef), false); @@ -559,9 +557,6 @@ SoundReader_FileReader::OpenResult RageSoundReader_WAV::Open( CString filename_ void RageSoundReader_WAV::Close() { - delete [] this->adpcm.aCoef; - this->adpcm.aCoef = NULL; - if( rw ) fclose( rw ); rw = NULL;