[Scummvm-cvs-logs] SF.net SVN: scummvm:[35214] scummvm/trunk/sound/fmopl.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Wed Dec 3 11:59:06 CET 2008
Revision: 35214
http://scummvm.svn.sourceforge.net/scummvm/?rev=35214&view=rev
Author: fingolfin
Date: 2008-12-03 10:59:06 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
cleanup
Modified Paths:
--------------
scummvm/trunk/sound/fmopl.cpp
Modified: scummvm/trunk/sound/fmopl.cpp
===================================================================
--- scummvm/trunk/sound/fmopl.cpp 2008-12-03 08:59:12 UTC (rev 35213)
+++ scummvm/trunk/sound/fmopl.cpp 2008-12-03 10:59:06 UTC (rev 35214)
@@ -234,10 +234,10 @@
EG_AED = EG_DST;
//EG_STEP = (96.0/EG_ENT);
- for (i = 0; i < (int)(sizeof(KSL_TABLE_SEED) / sizeof(double)); i++)
+ for (i = 0; i < ARRAYSIZE(KSL_TABLE_SEED); i++)
KSL_TABLE[i] = SC_KSL(KSL_TABLE_SEED[i]);
- for (i = 0; i < (int)(sizeof(SL_TABLE_SEED) / sizeof(uint)); i++)
+ for (i = 0; i < ARRAYSIZE(SL_TABLE_SEED); i++)
SL_TABLE[i] = SC_SL(SL_TABLE_SEED[i]);
}
@@ -246,15 +246,6 @@
/* --------------------- subroutines --------------------- */
-inline int Limit(int val, int max, int min) {
- if ( val > max )
- val = max;
- else if ( val < min )
- val = min;
-
- return val;
-}
-
/* status set and IRQ handling */
inline void OPL_STATUS_SET(FM_OPL *OPL, int flag) {
/* set status flag */
@@ -1027,7 +1018,7 @@
if(rythm)
OPL_CALC_RH(OPL, S_CH);
/* limit check */
- data = Limit(outd[0], OPL_MAXOUT, OPL_MINOUT);
+ data = CLIP(outd[0], OPL_MINOUT, OPL_MAXOUT);
/* store to sound buffer */
buf[i] = data >> OPL_OUTSB;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list