diff options
author | Chris Apers | 2004-10-22 12:11:24 +0000 |
---|---|---|
committer | Chris Apers | 2004-10-22 12:11:24 +0000 |
commit | dc02e95cd7dcd3e17b8763f14deee6d14cebb3ec (patch) | |
tree | cd10c3e026f516edbe99f1042ba1f8711e6aa583 /sound | |
parent | 2398753140469df11c5ffd5501963724f2fff358 (diff) | |
download | scummvm-rg350-dc02e95cd7dcd3e17b8763f14deee6d14cebb3ec.tar.gz scummvm-rg350-dc02e95cd7dcd3e17b8763f14deee6d14cebb3ec.tar.bz2 scummvm-rg350-dc02e95cd7dcd3e17b8763f14deee6d14cebb3ec.zip |
Prepare true AdLib support on PalmOS
svn-id: r15649
Diffstat (limited to 'sound')
-rw-r--r-- | sound/fmopl.cpp | 13 | ||||
-rw-r--r-- | sound/mididrv.cpp | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp index af2ce618c7..3c098fc9a5 100644 --- a/sound/fmopl.cpp +++ b/sound/fmopl.cpp @@ -174,7 +174,11 @@ static int *VIB_TABLE; /* 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_CH(OPL_CH *CH) { 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 @@ static int OPLOpenTable(void) { 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 @@ static void OPLCloseTable(void) { free(SIN_TABLE); free(AMS_TABLE); free(VIB_TABLE); +#ifdef __PALM_OS__ + free(ENV_CURVE); +#endif } /* CSM Key Controll */ diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index 919840c30f..5c66297f59 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -51,9 +51,7 @@ static const struct MidiDriverDescription midiDrivers[] = { {"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}, |