fix potiential memory leak

svn-id: r15779
This commit is contained in:
Gregory Montoir 2004-11-10 17:54:51 +00:00
parent 7480b7a45d
commit 20d12a515e

View File

@ -42,7 +42,7 @@ static const byte mt32_to_gm[128] = {
47, 117, 127, 118, 118, 116, 115, 119, 115, 112, 55, 124, 123, 0, 14, 117 // 7x
};
MusicPlayer::MusicPlayer(MidiDriver *driver, byte *data, uint32 size) : _driver(driver), _isPlaying(false), _looping(false), _randomLoop(false), _masterVolume(192), _queuePos(0), _musicData(data), _musicDataSize(size), _passThrough(false) {
MusicPlayer::MusicPlayer(MidiDriver *driver, byte *data, uint32 size) : _driver(driver), _isPlaying(false), _looping(false), _randomLoop(false), _masterVolume(192), _queuePos(0), _musicData(data), _musicDataSize(size), _passThrough(false), _buf(0) {
memset(_channel, 0, sizeof(_channel));
queueClear();
_lastSong = _currentSong = 0;
@ -59,6 +59,7 @@ static const byte mt32_to_gm[128] = {
_parser->unloadMusic();
this->close();
delete _parser;
delete[] _buf;
}
void MusicPlayer::setVolume(int volume) {