[Scummvm-cvs-logs] CVS: scummvm/sound rate.cpp,1.34,1.35
Max Horn
fingolfin at users.sourceforge.net
Mon Dec 27 15:59:02 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui options.cpp,1.63,1.64
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga animation.cpp,1.29,1.30 animation.h,1.14,1.15 ihnm_introproc.cpp,1.32,1.33 ite_introproc.cpp,1.35,1.36 saga.h,1.56,1.57 scene.cpp,1.62,1.63 script.h,1.35,1.36 sfuncs.cpp,1.53,1.54
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1715/sound
Modified Files:
rate.cpp
Log Message:
Use SoundMixer::kMaxMixerVolume
Index: rate.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/rate.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- rate.cpp 6 Jan 2004 12:45:33 -0000 1.34
+++ rate.cpp 27 Dec 2004 23:58:04 -0000 1.35
@@ -28,8 +28,9 @@
*/
#include "stdafx.h"
-#include "sound/rate.h"
#include "sound/audiostream.h"
+#include "sound/rate.h"
+#include "sound/mixer.h"
/**
* The precision of the fractional computations used by the rate converter.
@@ -166,10 +167,10 @@
}
// output left channel
- clampedAdd(*obuf++, (out[0] * (int)vol_l) >> 8);
+ clampedAdd(*obuf++, (out[0] * (int)vol_l) / SoundMixer::kMaxMixerVolume);
// output right channel
- clampedAdd(*obuf++, (out[1] * (int)vol_r) >> 8);
+ clampedAdd(*obuf++, (out[1] * (int)vol_r) / SoundMixer::kMaxMixerVolume);
// Increment output position
unsigned long tmp = opos_frac + opos_inc_frac;
@@ -236,10 +237,10 @@
}
// output left channel
- clampedAdd(*obuf++, (tmp0 * (int)vol_l) >> 8);
+ clampedAdd(*obuf++, (tmp0 * (int)vol_l) / SoundMixer::kMaxMixerVolume);
// output right channel
- clampedAdd(*obuf++, (tmp1 * (int)vol_r) >> 8);
+ clampedAdd(*obuf++, (tmp1 * (int)vol_r) / SoundMixer::kMaxMixerVolume);
}
return (ST_SUCCESS);
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui options.cpp,1.63,1.64
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga animation.cpp,1.29,1.30 animation.h,1.14,1.15 ihnm_introproc.cpp,1.32,1.33 ite_introproc.cpp,1.35,1.36 saga.h,1.56,1.57 scene.cpp,1.62,1.63 script.h,1.35,1.36 sfuncs.cpp,1.53,1.54
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list