[Scummvm-cvs-logs] CVS: scummvm/sound imuse.cpp,1.43,1.44 mixer.cpp,1.51,1.52

Max Horn fingolfin at users.sourceforge.net
Fri Aug 23 13:34:04 CEST 2002


Update of /cvsroot/scummvm/scummvm/sound
In directory usw-pr-cvs1:/tmp/cvs-serv2987

Modified Files:
	imuse.cpp mixer.cpp 
Log Message:
fix for bug #598938: sfx/music volume set 0 is not mute; some cleanup

Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/imuse.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- imuse.cpp	21 Aug 2002 11:24:33 -0000	1.43
+++ imuse.cpp	23 Aug 2002 20:33:29 -0000	1.44
@@ -1271,7 +1271,7 @@
 	if (vol > 127)
 		return -1;
 
-	if (_music_volume > 0)
+	if (_music_volume >= 0)
 		vol = vol * _music_volume / 128;
 
 	_master_volume = vol;

Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- mixer.cpp	20 Aug 2002 06:36:50 -0000	1.51
+++ mixer.cpp	23 Aug 2002 20:33:29 -0000	1.52
@@ -757,7 +757,6 @@
 {
 	mad_fixed_t const *ch;
 	const int16 *vol_tab = _mixer->_volume_table;
-//	unsigned char volume = ((int)vol_tab[1]) * 32 / 255;
 	unsigned char volume = ((int)vol_tab[1]) / 8;
 
 	if (_to_be_destroyed) {
@@ -770,7 +769,7 @@
 
 		/* Skip _silence_cut a the start */
 		if ((_pos_in_frame < _synth.pcm.length) && (_silence_cut > 0)) {
-			int diff = _synth.pcm.length - _pos_in_frame;
+			uint32 diff = _synth.pcm.length - _pos_in_frame;
 			
 			if (diff > _silence_cut)
 				diff = _silence_cut;
@@ -852,7 +851,6 @@
 {
 	mad_fixed_t const *ch;
 	mad_timer_t frame_duration;
-//	unsigned char volume = _mixer->_music_volume * 32 / 255;
 	unsigned char volume = _mixer->_music_volume / 8;
 
 	if (_to_be_destroyed) {





More information about the Scummvm-git-logs mailing list