Ticket #7983: mp3volume.diff

File mp3volume.diff, 2.7 KB (added by eriktorbjorn, 22 years ago)

Diff against a CVS snapshot from July 18

  • scummvm/gui.cpp

    diff -ur ScummVM-cvs20020718/scummvm/gui.cpp ScummVM-cvs20020718+hack/scummvm/gui.cpp
    old new  
    609609                imuse->set_music_volume(_s->_sound_volume_music);
    610610                imuse->set_master_volume(_s->_sound_volume_master);
    611611                _s->_mixer->set_volume(_s->_sound_volume_sfx);
     612                _s->_mixer->set_music_volume(_s->_sound_volume_music);
    612613                scummcfg->set("master_volume", _s->_sound_volume_master);
    613614                scummcfg->set("music_volume", _s->_sound_volume_music);
    614615                scummcfg->set("sfx_volume", _s->_sound_volume_sfx);
  • scummvm/scummvm.cpp

    diff -ur ScummVM-cvs20020718/scummvm/scummvm.cpp ScummVM-cvs20020718+hack/scummvm/scummvm.cpp
    old new  
    14921492                }   
    14931493        }
    14941494        scumm->_mixer->set_volume(128);
     1495        scumm->_mixer->set_music_volume(128);
    14951496
    14961497        /* HACK !!! */
    14971498        g_scumm = scumm;
  • scummvm/sound/mixer.cpp

    diff -ur ScummVM-cvs20020718/scummvm/sound/mixer.cpp ScummVM-cvs20020718+hack/scummvm/sound/mixer.cpp
    old new  
    200200                _volume_table[i] = ((int8)i) * volume;
    201201}
    202202
     203void SoundMixer::set_music_volume(int volume)
     204{
     205        _music_volume = volume;
     206}
     207
    203208#ifdef COMPRESSED_SOUND_FILE
    204209bool SoundMixer::Channel::sound_finished()
    205210{
     
    709714{
    710715        mad_fixed_t const *ch;
    711716        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;
    714718
    715719        if (_to_be_destroyed) {
    716720                real_destroy();
  • scummvm/sound/mixer.h

    diff -ur ScummVM-cvs20020718/scummvm/sound/mixer.h ScummVM-cvs20020718+hack/scummvm/sound/mixer.h
    old new  
    131131        uint _output_rate;
    132132
    133133        int16 *_volume_table;
     134        int _music_volume;
    134135
    135136        bool _paused;
    136137
     
    192193
    193194        /* set the volume, 0-256 */
    194195        void set_volume(int volume);
     196        void set_music_volume(int volume);
    195197
    196198        /* pause - unpause */
    197199        void pause(bool paused);
  • scummvm/sound.cpp

    diff -ur ScummVM-cvs20020718/scummvm/sound.cpp ScummVM-cvs20020718+hack/scummvm/sound.cpp
    old new  
    527527                se->set_master_volume(_sound_volume_master);
    528528                se->set_music_volume(_sound_volume_music);
    529529                _mixer->set_volume(_sound_volume_sfx);
     530                _mixer->set_music_volume(_sound_volume_music);
    530531        }
    531532        _sfxFile = openSfxFile();
    532533}