aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorFilippos Karapetis2007-08-22 16:00:45 +0000
committerFilippos Karapetis2007-08-22 16:00:45 +0000
commitd4d255cd6d60100ba3f44561009b1e90c3d0d3cf (patch)
tree42ba86dd9f85ece2e6038f6eaef1ab4f01a8d8aa /engines/saga
parentcd3f8577c1c75fba1b8aabf7d7c8447f945e5d65 (diff)
downloadscummvm-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.cpp6
-rw-r--r--engines/saga/music.h1
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; }