diff options
author | Jaromir Wysoglad | 2019-06-19 17:59:36 +0200 |
---|---|---|
committer | Thierry Crozat | 2019-07-28 15:09:14 +0100 |
commit | 5f355734fd8648d03d4e691c7c3bc70cfaeaf0a6 (patch) | |
tree | 71a13f299bd9bacf46d43cdd6e5c8dde6fe64d36 /engines/supernova/sound.cpp | |
parent | ee5b907f6279d8b28b799922ca11e2bbaaa72c46 (diff) | |
download | scummvm-rg350-5f355734fd8648d03d4e691c7c3bc70cfaeaf0a6.tar.gz scummvm-rg350-5f355734fd8648d03d4e691c7c3bc70cfaeaf0a6.tar.bz2 scummvm-rg350-5f355734fd8648d03d4e691c7c3bc70cfaeaf0a6.zip |
SUPERNOVA: Partial merge of the engine
I am merging the second engine to the first one. Both should be
fully functional as before right now
Current merge file status:
console: should be done
graphics: should be done
detection: 0% merged
imageid: appears to not be used anywhere, so it may be removed
resman: partialy merged
rooms: totaly different, 0% merged
screen: should be done
screenstatic: done
sound: partialy done
state: a lot different, just started to merge
supernova: mostly done
Diffstat (limited to 'engines/supernova/sound.cpp')
-rw-r--r-- | engines/supernova/sound.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/supernova/sound.cpp b/engines/supernova/sound.cpp index e7f3ce83bd..dc1c7c3630 100644 --- a/engines/supernova/sound.cpp +++ b/engines/supernova/sound.cpp @@ -53,6 +53,14 @@ void Sound::play(MusicId index) { -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); } +void Sound::playSiren() { + Audio::AudioStream *stream = _resMan->getSirenStream(); + + stop(); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, stream, + -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); +} + bool Sound::isPlaying() { return _mixer->isSoundHandleActive(_soundHandle); } @@ -62,4 +70,12 @@ void Sound::stop() { _mixer->stopHandle(_soundHandle); } +int Sound::getVolume() { + return _mixer->getChannelVolume(_soundHandle); +} + +void Sound::setVolume(int volume) { + _mixer->setChannelVolume(_soundHandle, volume); +} + } |