aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorMatthew Hoops2012-05-27 21:18:32 -0400
committerMatthew Hoops2012-05-28 14:00:16 -0400
commit10f7e805c20c164a7b3a20832237341136165e28 (patch)
tree5a561ded0a078ddd744b42337d253730bd5177ea /engines/agos
parent792d1e6f6ae3d910fcc88f43dc92a1a761496c1e (diff)
downloadscummvm-rg350-10f7e805c20c164a7b3a20832237341136165e28.tar.gz
scummvm-rg350-10f7e805c20c164a7b3a20832237341136165e28.tar.bz2
scummvm-rg350-10f7e805c20c164a7b3a20832237341136165e28.zip
VIDEO: Add volume/balance control to VideoDecoder
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/animation.cpp12
-rw-r--r--engines/agos/animation.h5
2 files changed, 16 insertions, 1 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index 29d1b36e19..10c01741ae 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -333,7 +333,7 @@ void MoviePlayerDXA::startSound() {
if (_bgSoundStream != NULL) {
_vm->_mixer->stopHandle(_bgSound);
- _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream);
+ _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream, -1, getVolume(), getBalance());
}
}
@@ -399,6 +399,16 @@ bool MoviePlayerDXA::processFrame() {
return false;
}
+void MoviePlayerDXA::updateVolume() {
+ if (g_system->getMixer()->isSoundHandleActive(_bgSound))
+ g_system->getMixer()->setChannelVolume(_bgSound, getVolume());
+}
+
+void MoviePlayerDXA::updateBalance() {
+ if (g_system->getMixer()->isSoundHandleActive(_bgSound))
+ g_system->getMixer()->setChannelBalance(_bgSound, getBalance());
+}
+
///////////////////////////////////////////////////////////////////////////////
// Movie player for Smacker movies
///////////////////////////////////////////////////////////////////////////////
diff --git a/engines/agos/animation.h b/engines/agos/animation.h
index 11936aa338..d1ff074b03 100644
--- a/engines/agos/animation.h
+++ b/engines/agos/animation.h
@@ -83,6 +83,11 @@ public:
void nextFrame();
virtual void stopVideo();
+protected:
+ // VideoDecoder API
+ void updateVolume();
+ void updateBalance();
+
private:
void handleNextFrame();
bool processFrame();