[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.35,1.36 mixer.h,1.19,1.20
James Brown
ender at users.sourceforge.net
Sat Jul 20 23:56:02 CEST 2002
Update of /cvsroot/scummvm/scummvm/sound
In directory usw-pr-cvs1:/tmp/cvs-serv18945/sound
Modified Files:
mixer.cpp mixer.h
Log Message:
Apply patch from Torbjörn Andersson to make MP3_CDMUSIC mixer use
music_volume instead of sfx_volume.
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- mixer.cpp 20 Jul 2002 07:57:22 -0000 1.35
+++ mixer.cpp 21 Jul 2002 06:55:33 -0000 1.36
@@ -201,6 +201,11 @@
_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 @@
{
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();
Index: mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- mixer.h 7 Jul 2002 18:04:03 -0000 1.19
+++ mixer.h 21 Jul 2002 06:55:33 -0000 1.20
@@ -131,6 +131,7 @@
uint _output_rate;
int16 *_volume_table;
+ int _music_volume;
bool _paused;
@@ -192,6 +193,7 @@
/* set the volume, 0-256 */
void set_volume(int volume);
+ void set_music_volume(int volume);
/* pause - unpause */
void pause(bool paused);
More information about the Scummvm-git-logs
mailing list