Skip to content

Commit

Permalink
SOUND: Use PtrVector the MDCT contexts in the WMA decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Oct 29, 2016
1 parent 8e4c06e commit 1667fdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/sound/decoders/wma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ WMACodec::WMACodec(int version, uint32 sampleRate, uint8 channels,
}

WMACodec::~WMACodec() {
for (std::vector<Common::MDCT *>::iterator m = _mdct.begin(); m != _mdct.end(); ++m)
delete *m;
}

void WMACodec::init(Common::SeekableReadStream *extraData) {
Expand Down
3 changes: 2 additions & 1 deletion src/sound/decoders/wma.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

#include "src/common/types.h"
#include "src/common/scopedptr.h"
#include "src/common/ptrvector.h"

#include "src/sound/decoders/codec.h"

Expand Down Expand Up @@ -174,7 +175,7 @@ class WMACodec : public Codec {
float _lspPowMTable2[(1 << kLSPPowBits)];

// MDCT
std::vector<Common::MDCT *> _mdct; ///< MDCT contexts.
Common::PtrVector<Common::MDCT> _mdct; ///< MDCT contexts.
std::vector<const float *> _mdctWindow; ///< MDCT window functions.

/** Overhang from the last superframe. */
Expand Down

0 comments on commit 1667fdd

Please sign in to comment.