QUEEN sound settings work with the GMM

svn-id: r33093
This commit is contained in:
Christopher Page 2008-07-18 01:46:33 +00:00
parent 437b9ee281
commit 45d24a58f9
3 changed files with 6 additions and 8 deletions

View File

@ -132,7 +132,7 @@ int AdlibMidiDriver::open() {
adlibSetNoteVolume(i, 0); adlibSetNoteVolume(i, 0);
adlibTurnNoteOff(i); adlibTurnNoteOff(i);
} }
_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true); _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
return 0; return 0;
} }

View File

@ -181,7 +181,7 @@ void QueenEngine::checkOptionSettings() {
} }
void QueenEngine::syncSoundSettings() { void QueenEngine::syncSoundSettings() {
_sound->setVolume(ConfMan.getInt("music_volume")); readOptionSettings();
} }
void QueenEngine::readOptionSettings() { void QueenEngine::readOptionSettings() {
@ -432,10 +432,6 @@ int QueenEngine::init() {
_logic = new LogicGame(this); _logic = new LogicGame(this);
} }
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
// Set mixer music volume to maximum, since music volume is regulated by MusicPlayer's MIDI messages
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, Audio::Mixer::kMaxMixerVolume);
_sound = Sound::makeSoundInstance(_mixer, this, _resource->getCompression()); _sound = Sound::makeSoundInstance(_mixer, this, _resource->getCompression());
_walk = new Walk(this); _walk = new Walk(this);
//_talkspeedScale = (MAX_TEXT_SPEED - MIN_TEXT_SPEED) / 255.0; //_talkspeedScale = (MAX_TEXT_SPEED - MIN_TEXT_SPEED) / 255.0;

View File

@ -224,7 +224,6 @@ void PCSound::playSpeech(const char *base) {
void PCSound::setVolume(int vol) { void PCSound::setVolume(int vol) {
Sound::setVolume(vol); Sound::setVolume(vol);
_mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, vol);
_music->setVolume(vol); _music->setVolume(vol);
} }
@ -275,6 +274,9 @@ void SBSound::playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *so
if (sound) { if (sound) {
f->read(sound, size); f->read(sound, size);
byte flags = Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE; byte flags = Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE;
if (soundHandle == &_speechHandle)
_mixer->playRaw(Audio::Mixer::kSpeechSoundType, soundHandle, sound, size, 11025, flags);
else
_mixer->playRaw(Audio::Mixer::kSFXSoundType, soundHandle, sound, size, 11025, flags); _mixer->playRaw(Audio::Mixer::kSFXSoundType, soundHandle, sound, size, 11025, flags);
} }
} }