aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-10-15 23:16:52 +0000
committerMax Horn2003-10-15 23:16:52 +0000
commitd71160af749b87cb6ecfb22e3b81e2e626a0c9c3 (patch)
treeda0a6a8b199453bc7826f74510a1bd8c48202f68
parent35c23667c3a2ee800472f9104f25c08d8b1c7117 (diff)
downloadscummvm-rg350-d71160af749b87cb6ecfb22e3b81e2e626a0c9c3.tar.gz
scummvm-rg350-d71160af749b87cb6ecfb22e3b81e2e626a0c9c3.tar.bz2
scummvm-rg350-d71160af749b87cb6ecfb22e3b81e2e626a0c9c3.zip
removed the kDefault*Volume constants
svn-id: r10816
-rw-r--r--base/gameDetector.cpp15
-rw-r--r--base/gameDetector.h9
-rw-r--r--scumm/imuse.cpp8
-rw-r--r--scumm/imuse.h1
-rw-r--r--scumm/imuse_internal.h1
-rw-r--r--scumm/scummvm.cpp4
6 files changed, 14 insertions, 24 deletions
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp
index 05aa52573c..2a5ec599ec 100644
--- a/base/gameDetector.cpp
+++ b/base/gameDetector.cpp
@@ -115,6 +115,15 @@ static const char USAGE_STRING[] =
#endif
+/** Default sound/music volumes.
+ * @todo move this to a better place.
+ */
+enum {
+ kDefaultMasterVolume = 192,
+ kDefaultSFXVolume = 192,
+ kDefaultMusicVolume = 192
+};
+
struct GraphicsMode {
const char *name;
const char *description;
@@ -186,9 +195,9 @@ GameDetector::GameDetector() {
#endif
// Sound & Music
- ConfMan.registerDefault("master_volume", kDefaultMasterVolume);
- ConfMan.registerDefault("music_volume", kDefaultMusicVolume);
- ConfMan.registerDefault("sfx_volume", kDefaultSFXVolume);
+ ConfMan.registerDefault("master_volume", 192);
+ ConfMan.registerDefault("music_volume", 192);
+ ConfMan.registerDefault("sfx_volume", 192);
ConfMan.registerDefault("multi_midi", false);
ConfMan.registerDefault("native_mt32", false);
diff --git a/base/gameDetector.h b/base/gameDetector.h
index 3e5eef7fca..fcb127036f 100644
--- a/base/gameDetector.h
+++ b/base/gameDetector.h
@@ -32,15 +32,6 @@ class OSystem;
class SoundMixer;
class Plugin;
-/** Default sound/music volumes.
- * @todo move this to a better place.
- */
-enum {
- kDefaultMasterVolume = 192,
- kDefaultSFXVolume = 192,
- kDefaultMusicVolume = 192
-};
-
/** Global (shared) game feature flags. */
enum {
GF_DEFAULT_TO_1X_SCALER = 1 << 31
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index 826def887a..1a0c68e1bc 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -22,7 +22,6 @@
#include "stdafx.h"
-#include "base/gameDetector.h" // For kDefaultMasterVolume etc.
#include "common/util.h"
#include "scumm/imuse.h"
@@ -610,10 +609,6 @@ int IMuseInternal::setMasterVolume(uint vol) {
return 0;
}
-int IMuseInternal::get_master_volume() {
- return _master_volume;
-}
-
int IMuseInternal::terminate1() {
_initialized = false;
stopAllSounds();
@@ -1150,8 +1145,6 @@ int IMuseInternal::initialize(OSystem *syst, SoundMixer *mixer, MidiDriver *nati
if (!_tempoFactor) _tempoFactor = 100;
_master_volume = 255;
- if (_music_volume < 1)
- _music_volume = kDefaultMusicVolume;
for (i = 0; i != 8; i++)
_channel_volume[i] = _channel_volume_eff[i] = _volchan_table[i] = 127;
@@ -1784,7 +1777,6 @@ int IMuse::save_or_load(Serializer *ser, ScummEngine *scumm) { in(); int ret = _
int IMuse::set_music_volume(uint vol) { in(); int ret = _target->set_music_volume(vol); out(); return ret; }
int IMuse::get_music_volume() { in(); int ret = _target->get_music_volume(); out(); return ret; }
void IMuse::setMasterVolume(int vol) { in(); _target->setMasterVolume(vol); out(); }
-int IMuse::get_master_volume() { in(); int ret = _target->get_master_volume(); out(); return ret; }
void IMuse::startSound(int sound) { in(); _target->startSound(sound); out(); }
void IMuse::stopSound(int sound) { in(); _target->stopSound(sound); out(); }
void IMuse::stopAllSounds() { in(); _target->stopAllSounds(); out(); }
diff --git a/scumm/imuse.h b/scumm/imuse.h
index acebe40529..4487cc3f4c 100644
--- a/scumm/imuse.h
+++ b/scumm/imuse.h
@@ -66,7 +66,6 @@ public:
int set_music_volume(uint vol);
int get_music_volume();
void setMasterVolume(int vol);
- int get_master_volume();
void startSound(int sound);
void stopSound(int sound);
void stopAllSounds();
diff --git a/scumm/imuse_internal.h b/scumm/imuse_internal.h
index e7e91b3f22..dc0c63ebc2 100644
--- a/scumm/imuse_internal.h
+++ b/scumm/imuse_internal.h
@@ -456,7 +456,6 @@ public:
int set_music_volume(uint vol);
int get_music_volume();
int setMasterVolume(uint vol);
- int get_master_volume();
bool startSound(int sound);
int stopSound(int sound);
int stopAllSounds();
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index c9aa44c2ef..99ecf679d0 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -660,8 +660,8 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst)
_silentDigitalImuse = true;
_noDigitalSamples = true;
}
- _mixer->setVolume(kDefaultSFXVolume * kDefaultMasterVolume / 255);
- _mixer->setMusicVolume(kDefaultMusicVolume);
+ _mixer->setVolume(_sound->_sound_volume_sfx * _sound->_sound_volume_master / 255);
+ _mixer->setMusicVolume(_sound->_sound_volume_music);
// Init iMuse
if (_features & GF_DIGI_IMUSE) {