diff options
author | Filippos Karapetis | 2007-08-22 16:00:45 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-08-22 16:00:45 +0000 |
commit | d4d255cd6d60100ba3f44561009b1e90c3d0d3cf (patch) | |
tree | 42ba86dd9f85ece2e6038f6eaef1ab4f01a8d8aa /engines/saga | |
parent | cd3f8577c1c75fba1b8aabf7d7c8447f945e5d65 (diff) | |
download | scummvm-rg350-d4d255cd6d60100ba3f44561009b1e90c3d0d3cf.tar.gz scummvm-rg350-d4d255cd6d60100ba3f44561009b1e90c3d0d3cf.tar.bz2 scummvm-rg350-d4d255cd6d60100ba3f44561009b1e90c3d0d3cf.zip |
Implemented music pause and resume
svn-id: r28698
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/music.cpp | 6 | ||||
-rw-r--r-- | engines/saga/music.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 11c3fa3f58..c65014c923 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -578,11 +578,13 @@ void Music::play(uint32 resourceId, MusicFlags flags) { } void Music::pause(void) { - //TODO: do it + _player->setVolume(-1); + _player->setPlaying(false); } void Music::resume(void) { - //TODO: do it} + _player->setVolume(_vm->_musicVolume == 10 ? 255 : _vm->_musicVolume * 25); + _player->setPlaying(true); } void Music::stop(void) { diff --git a/engines/saga/music.h b/engines/saga/music.h index 036fcbf897..1fbdda53f2 100644 --- a/engines/saga/music.h +++ b/engines/saga/music.h @@ -50,6 +50,7 @@ public: ~MusicPlayer(); bool isPlaying() { return _isPlaying; } + void setPlaying(bool playing) { _isPlaying = playing; } void setVolume(int volume); int getVolume() { return _masterVolume; } |