aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorChristopher Page2008-07-21 21:11:28 +0000
committerChristopher Page2008-07-21 21:11:28 +0000
commit0cae5552db214a7e11c552205e03fd5c0c38f6fd (patch)
tree2b4412e6a1830d7f3c3b16084391a3c216fbca6a /engines/parallaction
parent34d3d74b9737b508b237e7eec1249ef86d4560bb (diff)
downloadscummvm-rg350-0cae5552db214a7e11c552205e03fd5c0c38f6fd.tar.gz
scummvm-rg350-0cae5552db214a7e11c552205e03fd5c0c38f6fd.tar.bz2
scummvm-rg350-0cae5552db214a7e11c552205e03fd5c0c38f6fd.zip
Improved GMM sound setting config for Parallaction
svn-id: r33181
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/exec_ns.cpp2
-rw-r--r--engines/parallaction/parallaction.cpp6
-rw-r--r--engines/parallaction/parallaction.h2
-rw-r--r--engines/parallaction/sound.cpp3
4 files changed, 11 insertions, 2 deletions
diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp
index b4578f80ad..c77c70cd6e 100644
--- a/engines/parallaction/exec_ns.cpp
+++ b/engines/parallaction/exec_ns.cpp
@@ -538,7 +538,7 @@ uint16 Parallaction::runZone(ZonePtr z) {
break;
case kZoneHear:
- _soundMan->playSfx(z->u.hear->_name, z->u.hear->_channel, (z->_flags & kFlagsLooping) == kFlagsLooping, 60);
+ _soundMan->playSfx(z->u.hear->_name, z->u.hear->_channel, (z->_flags & kFlagsLooping) == kFlagsLooping);
break;
case kZoneSpeak:
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 2fc809977f..c998e26024 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -139,6 +139,7 @@ int Parallaction::init() {
_debugger = new Debugger(this);
setupBalloonManager();
+ syncSoundSettings();
return 0;
}
@@ -505,6 +506,11 @@ void Parallaction::freeZones() {
return;
}
+void Parallaction::syncSoundSettings() {
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume") / 6);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
+}
enum {
WALK_LEFT = 0,
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index 461ddc674f..a90f8c4f48 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -270,6 +270,8 @@ public:
void pauseJobs();
void resumeJobs();
+ virtual void syncSoundSettings();
+
void finalizeWalk(Character &character);
int16 selectWalkFrame(Character &character, const Common::Point& pos, const WalkNodePtr to);
void clipMove(Common::Point& pos, const Common::Point& to);
diff --git a/engines/parallaction/sound.cpp b/engines/parallaction/sound.cpp
index df6867a90c..4ac1399c3a 100644
--- a/engines/parallaction/sound.cpp
+++ b/engines/parallaction/sound.cpp
@@ -387,7 +387,8 @@ void AmigaSoundMan::playSfx(const char *filename, uint channel, bool looping, in
rate = ch->header.samplesPerSec;
}
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, &ch->handle, ch->data, ch->dataSize, rate, flags, -1, volume, 0, loopStart, loopEnd);
+ _mixer->playRaw(Audio::Mixer::kSFXSoundType, &ch->handle, ch->data, ch->dataSize, rate, flags, -1,
+ Audio::Mixer::kMaxChannelVolume, 0, loopStart, loopEnd);
}
void AmigaSoundMan::stopSfx(uint channel) {