diff options
-rw-r--r-- | engines/made/music.cpp | 21 | ||||
-rw-r--r-- | engines/made/music.h | 4 |
2 files changed, 6 insertions, 19 deletions
diff --git a/engines/made/music.cpp b/engines/made/music.cpp index 8394e78b24..ec9b59c12e 100644 --- a/engines/made/music.cpp +++ b/engines/made/music.cpp @@ -173,19 +173,12 @@ Music::~Music() { delete[] _midiMusicData; } -void Music::setVolume(int volume, int time) { - _targetVolume = volume * 2; // ScummVM has different volume scale - _currentVolumePercent = 0; - +void Music::setVolume(int volume) { if (volume == -1) // Set Full volume volume = 255; - if (time == 1) { - _player->setVolume(volume); - _currentVolume = volume; - return; - } - + _player->setVolume(volume); + _currentVolume = volume; } bool Music::isPlaying() { @@ -193,17 +186,13 @@ bool Music::isPlaying() { } void Music::play(XmidiResource *midiResource, MusicFlags flags) { - MidiParser *parser; + MidiParser *parser = 0; byte *resourceData; size_t resourceSize; debug(2, "Music::play %d", flags); - if (!_enabled) { - return; - } - - if (isPlaying()) { + if (!_enabled || isPlaying()) { return; } diff --git a/engines/made/music.h b/engines/made/music.h index 1403a7c0a1..7ca464bbc0 100644 --- a/engines/made/music.h +++ b/engines/made/music.h @@ -121,7 +121,7 @@ public: void resume(void); void stop(void); - void setVolume(int volume, int time = 1); + void setVolume(int volume); int getVolume() { return _currentVolume; } int32 *_songTable; @@ -135,9 +135,7 @@ private: int _enabled; bool _adlib; - int _targetVolume; int _currentVolume; - int _currentVolumePercent; MidiParser *xmidiParser; |