diff options
Diffstat (limited to 'engines/toltecs/music.cpp')
-rw-r--r-- | engines/toltecs/music.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/engines/toltecs/music.cpp b/engines/toltecs/music.cpp index c322961077..830e4a97da 100644 --- a/engines/toltecs/music.cpp +++ b/engines/toltecs/music.cpp @@ -20,15 +20,13 @@ * */ -// FIXME: This code is taken from SAGA and needs more work (e.g. setVolume). +#include "audio/midiparser.h" +#include "common/textconsole.h" #include "toltecs/toltecs.h" #include "toltecs/music.h" #include "toltecs/resource.h" -#include "audio/midiparser.h" -#include "common/textconsole.h" - namespace Toltecs { MusicPlayer::MusicPlayer(bool isGM) : _isGM(isGM), _buffer(NULL) { @@ -62,7 +60,7 @@ void MusicPlayer::playMIDI(const byte *data, uint32 size, bool loop) { memcpy(_buffer, data, size); MidiParser *parser; - + if (!memcmp(data, "FORM", 4)) parser = MidiParser::createParser_XMIDI(NULL); else @@ -77,7 +75,7 @@ void MusicPlayer::playMIDI(const byte *data, uint32 size, bool loop) { _parser = parser; - setVolume(127); + syncVolume(); _isLooping = loop; _isPlaying = true; @@ -86,16 +84,6 @@ void MusicPlayer::playMIDI(const byte *data, uint32 size, bool loop) { } } -void MusicPlayer::pause() { - setVolume(-1); - _isPlaying = false; -} - -void MusicPlayer::resume() { - setVolume(127); - _isPlaying = true; -} - void MusicPlayer::stopAndClear() { Common::StackLock lock(_mutex); stop(); |