diff options
author | Robert Göffringmann | 2004-01-07 17:47:46 +0000 |
---|---|---|
committer | Robert Göffringmann | 2004-01-07 17:47:46 +0000 |
commit | 8030f1b1483da8a96b7b8ff6bab246ffd3faad38 (patch) | |
tree | d8b6fc6bde1de078f6bd8fc69308620059d0f584 /sword1/music.cpp | |
parent | c46d2f05304b1b871df549bba9b2aed0656b7c44 (diff) | |
download | scummvm-rg350-8030f1b1483da8a96b7b8ff6bab246ffd3faad38.tar.gz scummvm-rg350-8030f1b1483da8a96b7b8ff6bab246ffd3faad38.tar.bz2 scummvm-rg350-8030f1b1483da8a96b7b8ff6bab246ffd3faad38.zip |
implemented volume control panel
svn-id: r12220
Diffstat (limited to 'sword1/music.cpp')
-rw-r--r-- | sword1/music.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sword1/music.cpp b/sword1/music.cpp index fa23acbe46..3895cc95a5 100644 --- a/sword1/music.cpp +++ b/sword1/music.cpp @@ -116,7 +116,7 @@ SwordMusic::SwordMusic(OSystem *system, SoundMixer *pMixer) { _mutex = _system->create_mutex(); _converter[0] = NULL; _converter[1] = NULL; - _volume = 192; + _volumeL = _volumeR = 192; } SwordMusic::~SwordMusic() { @@ -135,11 +135,17 @@ void SwordMusic::mixer(int16 *buf, uint32 len) { Common::StackLock lock(_mutex); for (int i = 0; i < ARRAYSIZE(_handles); i++) if (_handles[i].streaming() && _converter[i]) - _converter[i]->flow(_handles[i], buf, len, _volume, _volume); + _converter[i]->flow(_handles[i], buf, len, _volumeL, _volumeR); } -void SwordMusic::setVolume(uint8 vol) { - _volume = (st_volume_t)vol; +void SwordMusic::setVolume(uint8 volL, uint8 volR) { + _volumeL = (st_volume_t)volL; + _volumeR = (st_volume_t)volR; +} + +void SwordMusic::giveVolume(uint8 *volL, uint8 *volR) { + *volL = (uint8)_volumeL; + *volR = (uint8)_volumeR; } void SwordMusic::startMusic(int32 tuneId, int32 loopFlag) { |