diff -ur ScummVM-cvs20020718/scummvm/gui.cpp ScummVM-cvs20020718+hack/scummvm/gui.cpp
old
|
new
|
|
609 | 609 | imuse->set_music_volume(_s->_sound_volume_music); |
610 | 610 | imuse->set_master_volume(_s->_sound_volume_master); |
611 | 611 | _s->_mixer->set_volume(_s->_sound_volume_sfx); |
| 612 | _s->_mixer->set_music_volume(_s->_sound_volume_music); |
612 | 613 | scummcfg->set("master_volume", _s->_sound_volume_master); |
613 | 614 | scummcfg->set("music_volume", _s->_sound_volume_music); |
614 | 615 | scummcfg->set("sfx_volume", _s->_sound_volume_sfx); |
diff -ur ScummVM-cvs20020718/scummvm/scummvm.cpp ScummVM-cvs20020718+hack/scummvm/scummvm.cpp
old
|
new
|
|
1492 | 1492 | } |
1493 | 1493 | } |
1494 | 1494 | scumm->_mixer->set_volume(128); |
| 1495 | scumm->_mixer->set_music_volume(128); |
1495 | 1496 | |
1496 | 1497 | /* HACK !!! */ |
1497 | 1498 | g_scumm = scumm; |
diff -ur ScummVM-cvs20020718/scummvm/sound/mixer.cpp ScummVM-cvs20020718+hack/scummvm/sound/mixer.cpp
old
|
new
|
|
200 | 200 | _volume_table[i] = ((int8)i) * volume; |
201 | 201 | } |
202 | 202 | |
| 203 | void SoundMixer::set_music_volume(int volume) |
| 204 | { |
| 205 | _music_volume = volume; |
| 206 | } |
| 207 | |
203 | 208 | #ifdef COMPRESSED_SOUND_FILE |
204 | 209 | bool SoundMixer::Channel::sound_finished() |
205 | 210 | { |
… |
… |
|
709 | 714 | { |
710 | 715 | mad_fixed_t const *ch; |
711 | 716 | mad_timer_t frame_duration; |
712 | | const int16 *vol_tab = _mixer->_volume_table; |
713 | | unsigned char volume = ((int)vol_tab[1]) * 32 / 255; |
| 717 | unsigned char volume = _mixer->_music_volume * 32 / 255; |
714 | 718 | |
715 | 719 | if (_to_be_destroyed) { |
716 | 720 | real_destroy(); |
diff -ur ScummVM-cvs20020718/scummvm/sound/mixer.h ScummVM-cvs20020718+hack/scummvm/sound/mixer.h
old
|
new
|
|
131 | 131 | uint _output_rate; |
132 | 132 | |
133 | 133 | int16 *_volume_table; |
| 134 | int _music_volume; |
134 | 135 | |
135 | 136 | bool _paused; |
136 | 137 | |
… |
… |
|
192 | 193 | |
193 | 194 | /* set the volume, 0-256 */ |
194 | 195 | void set_volume(int volume); |
| 196 | void set_music_volume(int volume); |
195 | 197 | |
196 | 198 | /* pause - unpause */ |
197 | 199 | void pause(bool paused); |
diff -ur ScummVM-cvs20020718/scummvm/sound.cpp ScummVM-cvs20020718+hack/scummvm/sound.cpp
old
|
new
|
|
527 | 527 | se->set_master_volume(_sound_volume_master); |
528 | 528 | se->set_music_volume(_sound_volume_music); |
529 | 529 | _mixer->set_volume(_sound_volume_sfx); |
| 530 | _mixer->set_music_volume(_sound_volume_music); |
530 | 531 | } |
531 | 532 | _sfxFile = openSfxFile(); |
532 | 533 | } |