aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorMax Horn2004-12-27 00:27:00 +0000
committerMax Horn2004-12-27 00:27:00 +0000
commit67b311713d8f4cfcd460a9649e0075f24278a048 (patch)
treeb3cc2c445a34084ab1baa645c1ae818c44268eff /sword1
parent6670b2969a3669ae7bda7103407e8e5e22c2916a (diff)
downloadscummvm-rg350-67b311713d8f4cfcd460a9649e0075f24278a048.tar.gz
scummvm-rg350-67b311713d8f4cfcd460a9649e0075f24278a048.tar.bz2
scummvm-rg350-67b311713d8f4cfcd460a9649e0075f24278a048.zip
Added 'sound types' to the mixer - for now, only plain (for the premixer), SFX and music; volume is now controlled based on the sound type
svn-id: r16330
Diffstat (limited to 'sword1')
-rw-r--r--sword1/credits.cpp2
-rw-r--r--sword1/sound.cpp4
-rw-r--r--sword1/sword1.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/sword1/credits.cpp b/sword1/credits.cpp
index 75fc8b2060..ab454cb9a5 100644
--- a/sword1/credits.cpp
+++ b/sword1/credits.cpp
@@ -109,7 +109,7 @@ void CreditsPlayer::play(void) {
// everything's initialized, time to render and show the credits.
PlayingSoundHandle bgSound;
- _mixer->playInputStream(&bgSound, bgSoundStream, true, 0);
+ _mixer->playInputStream(SoundMixer::kMusicAudioDataType, &bgSound, bgSoundStream, 0);
int relDelay = 0;
uint16 scrollY = 0;
diff --git a/sword1/sound.cpp b/sword1/sound.cpp
index e409af5e02..5f976e49f2 100644
--- a/sword1/sound.cpp
+++ b/sword1/sound.cpp
@@ -194,7 +194,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
#ifdef USE_MAD
else if (_cowMode == CowMp3) {
_cowFile.seek(index);
- _mixer->playInputStream(&_speechHandle, makeMP3Stream(&_cowFile, sampleSize), false, SOUND_SPEECH_ID, speechVol, speechPan);
+ _mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_speechHandle, makeMP3Stream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
// with compressed audio, we can't calculate the wave volume.
// so default to talking.
for (int cnt = 0; cnt < 480; cnt++)
@@ -205,7 +205,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
#ifdef USE_VORBIS
else if (_cowMode == CowVorbis) {
_cowFile.seek(index);
- _mixer->playInputStream(&_speechHandle, makeVorbisStream(&_cowFile, sampleSize), false, SOUND_SPEECH_ID, speechVol, speechPan);
+ _mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_speechHandle, makeVorbisStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
for (int cnt = 0; cnt < 480; cnt++)
_waveVolume[cnt] = true;
_waveVolPos = 0;
diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp
index 218c6a7ee0..4bafa81544 100644
--- a/sword1/sword1.cpp
+++ b/sword1/sword1.cpp
@@ -165,8 +165,8 @@ int SwordEngine::init(GameDetector &detector) {
_resMan = new ResMan("swordres.rif");
debug(5, "Starting object manager");
_objectMan = new ObjectMan(_resMan);
- _mixer->setVolume(255);
- _mixer->setMusicVolume(256);
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, 256);
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, 256);
_mouse = new Mouse(_system, _resMan, _objectMan);
_screen = new Screen(_system, _resMan, _objectMan);
_music = new Music(_system, _mixer);