[Scummvm-cvs-logs] CVS: scummvm/sword1 credits.cpp,1.6,1.7 sound.cpp,1.39,1.40 sword1.cpp,1.77,1.78
Max Horn
fingolfin at users.sourceforge.net
Sun Dec 26 16:28:02 CET 2004
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17934/sword1
Modified Files:
credits.cpp sound.cpp sword1.cpp
Log Message:
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
Index: credits.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/credits.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- credits.cpp 20 Dec 2004 16:53:33 -0000 1.6
+++ credits.cpp 27 Dec 2004 00:26:59 -0000 1.7
@@ -109,7 +109,7 @@
// 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;
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sound.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- sound.cpp 28 Nov 2004 23:02:28 -0000 1.39
+++ sound.cpp 27 Dec 2004 00:26:59 -0000 1.40
@@ -194,7 +194,7 @@
#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 @@
#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;
Index: sword1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sword1.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- sword1.cpp 25 Dec 2004 20:59:18 -0000 1.77
+++ sword1.cpp 27 Dec 2004 00:26:59 -0000 1.78
@@ -165,8 +165,8 @@
_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);
More information about the Scummvm-git-logs
mailing list