[Scummvm-cvs-logs] CVS: scummvm/queen queen.cpp,1.113,1.114 sound.cpp,1.48,1.49

Max Horn fingolfin at users.sourceforge.net
Sun Dec 26 16:29:03 CET 2004


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17934/queen

Modified Files:
	queen.cpp sound.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: queen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/queen.cpp,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -d -r1.113 -r1.114
--- queen.cpp	25 Dec 2004 23:43:05 -0000	1.113
+++ queen.cpp	27 Dec 2004 00:26:55 -0000	1.114
@@ -358,9 +358,9 @@
 
 	if (!_mixer->isReady())
 		warning("Sound initialisation failed.");
-	_mixer->setVolume(ConfMan.getInt("sfx_volume"));
+	_mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, ConfMan.getInt("sfx_volume"));
 	// Set mixer music volume to maximum, since music volume is regulated by MusicPlayer's MIDI messages
-	_mixer->setMusicVolume(256);
+	_mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, 256);
 
 	int midiDriver = MidiDriver::detectMusicDriver(MDT_NATIVE | MDT_ADLIB | MDT_PREFER_NATIVE);
 	MidiDriver *driver = MidiDriver::createMidi(midiDriver);

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/sound.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- sound.cpp	19 Dec 2004 12:19:21 -0000	1.48
+++ sound.cpp	27 Dec 2004 00:26:56 -0000	1.49
@@ -201,7 +201,7 @@
 void MP3Sound::sfxPlay(const char *name, bool isSpeech) {
 	uint32 size;
 	File *f = _vm->resource()->giveCompressedSound(name, &size);
-	_mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size), false);
+	_mixer->playInputStream(SoundMixer::kSFXAudioDataType, isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size));
 }
 #endif
 
@@ -209,7 +209,7 @@
 void OGGSound::sfxPlay(const char *name, bool isSpeech) {
 	uint32 size;
 	File *f = _vm->resource()->giveCompressedSound(name, &size);		
-	_mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size), false);
+	_mixer->playInputStream(SoundMixer::kSFXAudioDataType, isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size));
 }
 #endif
 
@@ -217,7 +217,7 @@
 void FLACSound::sfxPlay(const char *name, bool isSpeech) {
 	uint32 size;
 	File *f = _vm->resource()->giveCompressedSound(name, &size);		
-	_mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size), false);
+	_mixer->playInputStream(SoundMixer::kSFXAudioDataType, isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size));
 }
 #endif
 





More information about the Scummvm-git-logs mailing list