More cleanup

svn-id: r31692
This commit is contained in:
Filippos Karapetis 2008-04-24 14:15:35 +00:00
parent 068372ac94
commit 00e652f8e4

View File

@ -141,9 +141,6 @@ void MusicPlayer::onTimer(void *refCon) {
}
void MusicPlayer::play(XmidiResource *midiResource, MusicFlags flags) {
byte *resourceData;
size_t resourceSize;
if (_isPlaying)
return;
@ -153,11 +150,7 @@ void MusicPlayer::play(XmidiResource *midiResource, MusicFlags flags) {
_isGM = true;
resourceSize = midiResource->getSize();
resourceData = new byte[resourceSize];
memcpy(resourceData, midiResource->getData(), resourceSize);
if (_xmidiParser->loadMusic(resourceData, resourceSize)) {
if (_xmidiParser->loadMusic(midiResource->getData(), midiResource->getSize())) {
MidiParser *parser = _xmidiParser;
parser->setTrack(0);
parser->setMidiDriver(this);