diff options
author | James Brown | 2002-07-21 06:55:33 +0000 |
---|---|---|
committer | James Brown | 2002-07-21 06:55:33 +0000 |
commit | 8de1ace6c7a8cb2d18abdea56edb7991731ba38f (patch) | |
tree | 7b86b5804b051cb8feba0ff124b68ae8cf7c29fa /sound/mixer.cpp | |
parent | 7a418b540d2bac3445774249bcc84d034f0e1c36 (diff) | |
download | scummvm-rg350-8de1ace6c7a8cb2d18abdea56edb7991731ba38f.tar.gz scummvm-rg350-8de1ace6c7a8cb2d18abdea56edb7991731ba38f.tar.bz2 scummvm-rg350-8de1ace6c7a8cb2d18abdea56edb7991731ba38f.zip |
Apply patch from Torbj�rn Andersson to make MP3_CDMUSIC mixer use
music_volume instead of sfx_volume.
svn-id: r4611
Diffstat (limited to 'sound/mixer.cpp')
-rw-r--r-- | sound/mixer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp index 73b793814c..e44b459ca4 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -201,6 +201,11 @@ void SoundMixer::set_volume(int volume) _volume_table[i] = ((int8)i) * volume; } +void SoundMixer::set_music_volume(int volume) +{ + _music_volume = volume; +} + #ifdef COMPRESSED_SOUND_FILE bool SoundMixer::Channel::sound_finished() { @@ -710,8 +715,7 @@ void SoundMixer::Channel_MP3_CDMUSIC::mix(int16 *data, uint len) { mad_fixed_t const *ch; mad_timer_t frame_duration; - const int16 *vol_tab = _mixer->_volume_table; - unsigned char volume = ((int)vol_tab[1]) * 32 / 255; + unsigned char volume = _mixer->_music_volume * 32 / 255; if (_to_be_destroyed) { real_destroy(); |