[Scummvm-cvs-logs] CVS: scummvm/sword2 controls.cpp,1.88,1.89 controls.h,1.19,1.20 sound.cpp,1.59,1.60 sound.h,1.20,1.21 sword2.cpp,1.143,1.144
Max Horn
fingolfin at users.sourceforge.net
Tue May 10 16:50:54 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.39,1.40 animation.h,1.17,1.18 credits.cpp,1.12,1.13 credits.h,1.3,1.4 logic.cpp,1.51,1.52 logic.h,1.14,1.15 music.cpp,1.42,1.43 music.h,1.19,1.20 sound.cpp,1.44,1.45 sound.h,1.19,1.20 sword1.cpp,1.86,1.87
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2/driver animation.cpp,1.63,1.64 animation.h,1.37,1.38 d_sound.cpp,1.149,1.150
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29875/sword2
Modified Files:
controls.cpp controls.h sound.cpp sound.h sword2.cpp
Log Message:
Moved class SoundMixer to Audio::Mixer (didn't call the namespace 'Sound' because we already have many classes with that name)
Index: controls.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/controls.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- controls.cpp 9 Mar 2005 18:12:51 -0000 1.88
+++ controls.cpp 10 May 2005 23:48:47 -0000 1.89
@@ -907,11 +907,11 @@
_fxSwitch->linkSurfaceImages(_musicSwitch, 516, 250);
_fxSwitch->reverseStates();
- int volStep = SoundMixer::kMaxMixerVolume / 10;
+ int volStep = Audio::Mixer::kMaxMixerVolume / 10;
- _musicSlider = new Slider(this, _panel, SoundMixer::kMaxMixerVolume, 309, 161, 170, 27, volStep);
- _speechSlider = new Slider(this, _panel, SoundMixer::kMaxMixerVolume, 309, 208, 170, 27, volStep, _musicSlider);
- _fxSlider = new Slider(this, _panel, SoundMixer::kMaxMixerVolume, 309, 254, 170, 27, volStep, _musicSlider);
+ _musicSlider = new Slider(this, _panel, Audio::Mixer::kMaxMixerVolume, 309, 161, 170, 27, volStep);
+ _speechSlider = new Slider(this, _panel, Audio::Mixer::kMaxMixerVolume, 309, 208, 170, 27, volStep, _musicSlider);
+ _fxSlider = new Slider(this, _panel, Audio::Mixer::kMaxMixerVolume, 309, 254, 170, 27, volStep, _musicSlider);
_gfxSlider = new Slider(this, _panel, 3, 309, 341, 170, 27, 1, _musicSlider);
_gfxPreview = new Widget(this, 4);
@@ -945,9 +945,9 @@
_speechSwitch->setValue(!_vm->_sound->isSpeechMute());
_fxSwitch->setValue(!_vm->_sound->isFxMute());
- _musicSlider->setValue(_mixer->getVolumeForSoundType(SoundMixer::kMusicSoundType));
- _speechSlider->setValue(_mixer->getVolumeForSoundType(SoundMixer::kSpeechSoundType));
- _fxSlider->setValue(_mixer->getVolumeForSoundType(SoundMixer::kSFXSoundType));
+ _musicSlider->setValue(_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType));
+ _speechSlider->setValue(_mixer->getVolumeForSoundType(Audio::Mixer::kSpeechSoundType));
+ _fxSlider->setValue(_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType));
_gfxSlider->setValue(_vm->_screen->getRenderLevel());
_gfxPreview->setState(_vm->_screen->getRenderLevel());
@@ -997,7 +997,7 @@
if (widget == _musicSwitch) {
_vm->_sound->muteMusic(result != 0);
} else if (widget == _musicSlider) {
- _vm->_mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, result);
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, result);
_vm->_sound->muteMusic(result == 0);
_musicSwitch->setValue(result != 0);
} else if (widget == _speechSlider) {
@@ -1015,9 +1015,9 @@
_vm->_sound->muteSpeech(!_speechSwitch->getValue());
_vm->_sound->muteFx(!_fxSwitch->getValue());
_vm->_sound->setReverseStereo(_reverseStereoSwitch->getValue());
- _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, _musicSlider->getValue());
- _mixer->setVolumeForSoundType(SoundMixer::kSpeechSoundType, _speechSlider->getValue());
- _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, _fxSlider->getValue());
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, _musicSlider->getValue());
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, _speechSlider->getValue());
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, _fxSlider->getValue());
_vm->_screen->setRenderLevel(_gfxSlider->getValue());
_vm->writeSettings();
Index: controls.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/controls.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- controls.h 21 Feb 2005 08:16:47 -0000 1.19
+++ controls.h 10 May 2005 23:48:48 -0000 1.20
@@ -86,7 +86,7 @@
Button *_okButton;
Button *_cancelButton;
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
public:
OptionsDialog(Sword2Engine *vm);
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sound.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- sound.cpp 10 May 2005 22:56:24 -0000 1.59
+++ sound.cpp 10 May 2005 23:48:48 -0000 1.60
@@ -81,7 +81,7 @@
_mixBuffer = NULL;
_mixBufferLen = 0;
- _vm->_mixer->setupPremix(this, SoundMixer::kMusicSoundType);
+ _vm->_mixer->setupPremix(this, Audio::Mixer::kMusicSoundType);
}
Sound::~Sound() {
@@ -220,7 +220,7 @@
delay *= 12;
}
- volume = (volume * SoundMixer::kMaxChannelVolume) / 16;
+ volume = (volume * Audio::Mixer::kMaxChannelVolume) / 16;
pan = (pan * 127) / 16;
if (isReverseStereo())
@@ -247,10 +247,10 @@
}
int32 Sound::playFx(FxQueueEntry *fx) {
- return playFx(&fx->handle, fx->data, fx->len, fx->volume, fx->pan, (fx->type == FX_LOOP), SoundMixer::kSFXSoundType);
+ return playFx(&fx->handle, fx->data, fx->len, fx->volume, fx->pan, (fx->type == FX_LOOP), Audio::Mixer::kSFXSoundType);
}
-int32 Sound::playFx(SoundHandle *handle, byte *data, uint32 len, uint8 vol, int8 pan, bool loop, SoundMixer::SoundType soundType) {
+int32 Sound::playFx(SoundHandle *handle, byte *data, uint32 len, uint8 vol, int8 pan, bool loop, Audio::Mixer::SoundType soundType) {
if (_fxMuted)
return RD_OK;
@@ -267,10 +267,10 @@
}
if (isReverseStereo())
- flags |= SoundMixer::FLAG_REVERSE_STEREO;
+ flags |= Audio::Mixer::FLAG_REVERSE_STEREO;
if (loop)
- flags |= SoundMixer::FLAG_LOOP;
+ flags |= Audio::Mixer::FLAG_LOOP;
_vm->_mixer->playRaw(handle, data + stream.pos(), size, rate, flags, -1, vol, pan, 0, 0, soundType);
return RD_OK;
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sound.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- sound.h 10 May 2005 22:56:24 -0000 1.20
+++ sound.h 10 May 2005 23:48:48 -0000 1.21
@@ -253,7 +253,7 @@
void queueFx(int32 res, int32 type, int32 delay, int32 volume, int32 pan);
int32 playFx(FxQueueEntry *fx);
- int32 playFx(SoundHandle *handle, byte *data, uint32 len, uint8 vol, int8 pan, bool loop, SoundMixer::SoundType soundType);
+ int32 playFx(SoundHandle *handle, byte *data, uint32 len, uint8 vol, int8 pan, bool loop, Audio::Mixer::SoundType soundType);
int32 stopFx(int32 i);
int32 setFxIdVolumePan(int32 id, int vol, int pan = 255);
Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sword2.cpp,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- sword2.cpp 10 May 2005 22:56:25 -0000 1.143
+++ sword2.cpp 10 May 2005 23:48:48 -0000 1.144
@@ -188,9 +188,9 @@
}
void Sword2Engine::readSettings() {
- _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
- _mixer->setVolumeForSoundType(SoundMixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
setSubtitles(ConfMan.getBool("subtitles"));
_sound->muteMusic(ConfMan.getBool("music_mute"));
_sound->muteSpeech(ConfMan.getBool("speech_mute"));
@@ -201,9 +201,9 @@
}
void Sword2Engine::writeSettings() {
- ConfMan.set("music_volume", _mixer->getVolumeForSoundType(SoundMixer::kMusicSoundType));
- ConfMan.set("speech_volume", _mixer->getVolumeForSoundType(SoundMixer::kSpeechSoundType));
- ConfMan.set("sfx_volume", _mixer->getVolumeForSoundType(SoundMixer::kSFXSoundType));
+ ConfMan.set("music_volume", _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType));
+ ConfMan.set("speech_volume", _mixer->getVolumeForSoundType(Audio::Mixer::kSpeechSoundType));
+ ConfMan.set("sfx_volume", _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType));
ConfMan.set("music_mute", _sound->isMusicMute());
ConfMan.set("speech_mute", _sound->isSpeechMute());
ConfMan.set("sfx_mute", _sound->isFxMute());
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.39,1.40 animation.h,1.17,1.18 credits.cpp,1.12,1.13 credits.h,1.3,1.4 logic.cpp,1.51,1.52 logic.h,1.14,1.15 music.cpp,1.42,1.43 music.h,1.19,1.20 sound.cpp,1.44,1.45 sound.h,1.19,1.20 sword1.cpp,1.86,1.87
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2/driver animation.cpp,1.63,1.64 animation.h,1.37,1.38 d_sound.cpp,1.149,1.150
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list