diff options
author | Chris Apers | 2005-09-03 18:05:19 +0000 |
---|---|---|
committer | Chris Apers | 2005-09-03 18:05:19 +0000 |
commit | 587053118445a1ca3abf849070ab22a25ca2e467 (patch) | |
tree | e54c9745492bba68f0761784be231d2c07201baf | |
parent | 6b63495d5d52b9156e817b136fa80e3c42993423 (diff) | |
download | scummvm-rg350-587053118445a1ca3abf849070ab22a25ca2e467.tar.gz scummvm-rg350-587053118445a1ca3abf849070ab22a25ca2e467.tar.bz2 scummvm-rg350-587053118445a1ca3abf849070ab22a25ca2e467.zip |
Change PalmOS ident
svn-id: r18756
-rw-r--r-- | sound/fmopl.cpp | 23 | ||||
-rw-r--r-- | sound/mididrv.cpp | 16 |
2 files changed, 21 insertions, 18 deletions
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp index 056459ceea..9918535be0 100644 --- a/sound/fmopl.cpp +++ b/sound/fmopl.cpp @@ -38,7 +38,7 @@ #include "common/config-manager.h" #endif -#if defined(__PALM_OS__) +#if defined(PALMOS_68K) #include "arm/native.h" #include "arm/macros.h" #endif @@ -181,7 +181,7 @@ static int *VIB_TABLE; /* envelope output curve table */ /* attack + decay + OFF */ //static int ENV_CURVE[2*EG_ENT+1]; -#ifndef __PALM_OS__ +#ifndef PALMOS_68K static int ENV_CURVE[2 * 4096 + 1]; // to keep it static ... #else static int *ENV_CURVE = NULL; // to keep it static ... @@ -451,7 +451,7 @@ inline void OPL_CALC_CH(OPL_CH *CH) { env_out=OPL_CALC_SLOT(SLOT); if(env_out < (uint)(EG_ENT - 1)) { /* PG */ - if(SLOT->vib) + if(SLOT->vib) SLOT->Cnt += (SLOT->Incr * vib / VIB_RATE); else SLOT->Cnt += SLOT->Incr; @@ -487,7 +487,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; @@ -584,7 +584,7 @@ static void init_timetables(FM_OPL *OPL, int ARRATE, int DRRATE) { OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0; for (i = 4; i <= 60; i++){ rate = OPL->freqbase; /* frequency rate */ - if(i < 60) + if(i < 60) rate *= 1.0 + (i & 3) * 0.25; /* b0-1 : x1 , x1.25 , x1.5 , x1.75 */ rate *= 1 << ((i >> 2) - 1); /* b2-5 : shift bit */ rate *= (double)(EG_ENT << ENV_BITS); @@ -604,7 +604,7 @@ static int OPLOpenTable(void) { int i,j; double pom; -#ifdef __PALM_OS__ +#ifdef PALMOS_68K if (!ENV_CURVE) ENV_CURVE = (int *)calloc(2 * 4096 + 1, sizeof(int)); #endif @@ -689,7 +689,7 @@ static void OPLCloseTable(void) { free(SIN_TABLE); free(AMS_TABLE); free(VIB_TABLE); -#ifdef __PALM_OS__ +#ifdef PALMOS_68K free(ENV_CURVE); ENV_CURVE = NULL; #endif @@ -732,7 +732,7 @@ static void OPL_initalize(FM_OPL *OPL) { /* ---------- write a OPL registers ---------- */ void OPLWriteReg(FM_OPL *OPL, int r, int v) { -#ifdef __PALM_OS__ +#ifdef PALMOS_68K ARM_START(OPLDriverType) ARM_INIT(COMMON_OPLWRITEREG) ARM_ADDM(OPL) @@ -964,7 +964,7 @@ static void OPL_UnLockTable(void) { /* ---------- update one of chip ----------- */ void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length) { -#ifdef __PALM_OS__ +#ifdef PALMOS_68K ARM_START(OPLDriverType) ARM_INIT(COMMON_YM3812YPDATEONE) ARM_ADDM(OPL) @@ -973,7 +973,7 @@ void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length) { ARM_CALL(ARM_COMMON, PNO_DATA()) ARM_END(); #endif - + int i; int data; int16 *buf = buffer; @@ -1183,7 +1183,7 @@ FM_OPL *makeAdlibOPL(int rate) { } #endif -#ifdef __PALM_OS__ +#ifdef PALMOS_68K // HQ is really unstable on PalmOS (at least on ARM), // don't know why... seems to read out of buffer ... env_bits = FMOPL_ENV_BITS_MQ; @@ -1200,3 +1200,4 @@ FM_OPL *makeAdlibOPL(int rate) { OPLBuildTables(env_bits, eg_ent); return OPLCreate(OPL_TYPE_YM3812, 3579545, rate); } + diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index fe24f51a1e..e20f887670 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -65,7 +65,7 @@ static const struct MidiDriverDescription midiDrivers[] = { {"mt32", "MT-32", MD_MT32}, #endif -#if defined(__PALM_OS__) +#if defined(PALMOS_MODE) {"ypa1", "Yamaha Pa1", MD_YPA1}, {"zodiac", "Tapwave Zodiac", MD_ZODIAC}, #endif @@ -130,13 +130,13 @@ int MidiDriver::detectMusicDriver(int midiFlags) { musicDriver = MD_WINDOWS; // MD_WINDOWS is default MidiDriver on windows targets #elif defined(MACOSX) musicDriver = MD_COREAUDIO; - #elif defined(__PALM_OS__) // must be before mac + #elif defined(PALMOS_MODE) // must be before mac musicDriver = MD_YPA1; // TODO : change this and use Zodiac driver when needed #elif defined(__MORPHOS__) musicDriver = MD_ETUDE; #elif defined(_WIN32_WCE) || defined(UNIX) || defined(X11_BACKEND) || defined (__SYMBIAN32__) // Always use MIDI emulation via adlib driver on CE and UNIX device - + // TODO: We should, for the Unix targets, attempt to detect // whether a sequencer is available, and use it instead. musicDriver = MD_ADLIB; @@ -189,13 +189,14 @@ MidiDriver *MidiDriver::createMidi(int midiDriver) { // don't create anything for now. case MD_PCSPK: case MD_PCJR: return NULL; -#if defined(__PALM_OS__) +#if defined(PALMOS_MODE) +#if defined(COMPILE_CLIE) case MD_YPA1: return MidiDriver_YamahaPa1_create(); -#ifndef DISABLE_TAPWAVE +#elif defined(COMPILE_ZODIAC) case MD_ZODIAC: return MidiDriver_Zodiac_create(); #endif #endif -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) case MD_WINDOWS: return MidiDriver_WIN_create(); #endif #if defined(__MORPHOS__) @@ -204,7 +205,7 @@ MidiDriver *MidiDriver::createMidi(int midiDriver) { #if defined(UNIX) && !defined(__BEOS__) && !defined(MACOSX) case MD_SEQ: return MidiDriver_SEQ_create(); #endif -#if (defined(MACOSX) || defined(macintosh)) && !defined(__PALM_OS__) +#if (defined(MACOSX) || defined(macintosh)) && !defined(PALMOS_MODE) case MD_QTMUSIC: return MidiDriver_QT_create(); #endif #if defined(MACOSX) @@ -218,3 +219,4 @@ MidiDriver *MidiDriver::createMidi(int midiDriver) { error("Invalid midi driver selected"); return NULL; } + |