[Scummvm-cvs-logs] CVS: scummvm/sound fmopl.cpp,1.23,1.24 mididrv.cpp,1.51,1.52
Chris Apers
chrilith at users.sourceforge.net
Fri Oct 22 05:19:34 CEST 2004
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24786
Modified Files:
fmopl.cpp mididrv.cpp
Log Message:
Prepare true AdLib support on PalmOS
Index: fmopl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/fmopl.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- fmopl.cpp 9 May 2004 14:26:01 -0000 1.23
+++ fmopl.cpp 22 Oct 2004 12:11:24 -0000 1.24
@@ -174,7 +174,11 @@
/* envelope output curve table */
/* attack + decay + OFF */
//static int ENV_CURVE[2*EG_ENT+1];
+#ifndef __PALM_OS__
static int ENV_CURVE[2 * 4096 + 1]; // to keep it static ...
+#else
+static int *ENV_CURVE; // to keep it static ...
+#endif
/* multiple table */
#define ML(a) (int)(a * 2)
@@ -476,7 +480,7 @@
inline void OPL_CALC_RH(OPL_CH *CH) {
uint env_tam, env_sd, env_top, env_hh;
int whitenoise = int(oplRnd.getRandomNumber(1) * (WHITE_NOISE_db / EG_STEP));
-
+
int tone8;
OPL_SLOT *SLOT;
@@ -593,6 +597,10 @@
int i,j;
double pom;
+#ifdef __PALM_OS__
+ ENV_CURVE = (int *)calloc(2 * 4096 + 1, sizeof(int));
+#endif
+
/* allocate dynamic tables */
if((TL_TABLE = (int *)malloc(TL_MAX * 2 * sizeof(int))) == NULL)
return 0;
@@ -673,6 +681,9 @@
free(SIN_TABLE);
free(AMS_TABLE);
free(VIB_TABLE);
+#ifdef __PALM_OS__
+ free(ENV_CURVE);
+#endif
}
/* CSM Key Controll */
Index: mididrv.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mididrv.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- mididrv.cpp 21 Oct 2004 22:37:37 -0000 1.51
+++ mididrv.cpp 22 Oct 2004 12:11:24 -0000 1.52
@@ -51,9 +51,7 @@
{"alsa", "ALSA", MD_ALSA},
#endif
-#if !defined(__PALM_OS__)
{"adlib", "Adlib", MD_ADLIB},
-#endif
{"towns", "FM Towns", MD_TOWNS},
{"pcspk", "PC Speaker", MD_PCSPK},
{"pcjr", "IBM PCjr", MD_PCJR},
More information about the Scummvm-git-logs
mailing list