diff options
author | Filippos Karapetis | 2008-04-24 13:12:08 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-04-24 13:12:08 +0000 |
commit | 68c511423e529d240c4d014b165924eeca6ec1b9 (patch) | |
tree | 568f5d42218c4256797f16b03c8a365eb67235de /engines/made/music.cpp | |
parent | ffc1e56cbd6dc4c9b09f5a23869ecbb5360a667b (diff) | |
download | scummvm-rg350-68c511423e529d240c4d014b165924eeca6ec1b9.tar.gz scummvm-rg350-68c511423e529d240c4d014b165924eeca6ec1b9.tar.bz2 scummvm-rg350-68c511423e529d240c4d014b165924eeca6ec1b9.zip |
Cleanup
svn-id: r31686
Diffstat (limited to 'engines/made/music.cpp')
-rw-r--r-- | engines/made/music.cpp | 21 |
1 files changed, 5 insertions, 16 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; } |