aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/draci.cpp
diff options
context:
space:
mode:
authorRobert Špalek2009-10-12 22:27:23 +0000
committerRobert Špalek2009-10-12 22:27:23 +0000
commite77928440307f0d8a765e32100e031989ad25ff5 (patch)
tree970e4c758de39c9c5f97bc6557428a0363a07101 /engines/draci/draci.cpp
parentd306e1219e606f5af6b3dd37556f1ba1ecb5ed51 (diff)
downloadscummvm-rg350-e77928440307f0d8a765e32100e031989ad25ff5.tar.gz
scummvm-rg350-e77928440307f0d8a765e32100e031989ad25ff5.tar.bz2
scummvm-rg350-e77928440307f0d8a765e32100e031989ad25ff5.zip
Sound effects are now correctly played.
Dubbing is not yet played. svn-id: r45000
Diffstat (limited to 'engines/draci/draci.cpp')
-rw-r--r--engines/draci/draci.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 1868460fcf..8fc7046d86 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -62,6 +62,9 @@ const char *stringsPath = "RETEZCE.DFW";
const char *soundsPath = "CD2.SAM";
const char *dubbingPath = "CD.SAM";
+const uint kSoundsFrequency = 13000;
+const uint kDubbingFrequency = 22000;
+
DraciEngine::DraciEngine(OSystem *syst, const ADGameDescription *gameDesc)
: Engine(syst) {
// Put your engine in a sane state, but do nothing big yet;
@@ -79,6 +82,7 @@ DraciEngine::DraciEngine(OSystem *syst, const ADGameDescription *gameDesc)
Common::addDebugChannel(kDraciArchiverDebugLevel, "archiver", "BAR archiver debug info");
Common::addDebugChannel(kDraciLogicDebugLevel, "logic", "Game logic debug info");
Common::addDebugChannel(kDraciAnimationDebugLevel, "animation", "Animation debug info");
+ Common::addDebugChannel(kDraciSoundDebugLevel, "sound", "Sound debug info");
// Don't forget to register your random source
g_eventRec.registerRandomSource(_rnd, "draci");
@@ -109,8 +113,9 @@ int DraciEngine::init() {
_itemImagesArchive = new BArchive(itemImagesPath);
_stringsArchive = new BArchive(stringsPath);
- _soundsArchive = new SoundArchive(soundsPath);
- _dubbingArchive = new SoundArchive(dubbingPath);
+ _soundsArchive = new SoundArchive(soundsPath, kSoundsFrequency);
+ _dubbingArchive = new SoundArchive(dubbingPath, kDubbingFrequency);
+ _sound = new Sound(_mixer);
// Load the game's fonts
_smallFont = new Font(kFontSmall);
@@ -298,6 +303,7 @@ DraciEngine::~DraciEngine() {
delete _soundsArchive;
delete _dubbingArchive;
+ delete _sound;
// Remove all of our debug levels here
Common::clearAllDebugChannels();
@@ -337,7 +343,7 @@ void DraciEngine::pauseEngineIntern(bool pause) {
void DraciEngine::syncSoundSettings() {
Engine::syncSoundSettings();
- // TODO: update our volumes
+ _sound->setVolume();
}
const char *DraciEngine::getSavegameFile(int saveGameIdx) {