diff options
author | Neil Millstone | 2006-07-22 10:56:11 +0000 |
---|---|---|
committer | Neil Millstone | 2006-07-22 10:56:11 +0000 |
commit | 42cebc00dcb5c274c96f69bb2658906d1ce269ec (patch) | |
tree | 155c0bc0ebe2290ff48406cf36f0c05685d576ba /sound | |
parent | 8242e6966d45c20316887b9c7f4691ad4d65fc03 (diff) | |
download | scummvm-rg350-42cebc00dcb5c274c96f69bb2658906d1ce269ec.tar.gz scummvm-rg350-42cebc00dcb5c274c96f69bb2658906d1ce269ec.tar.bz2 scummvm-rg350-42cebc00dcb5c274c96f69bb2658906d1ce269ec.zip |
Speed increase for DS port - uses cache ram to store SIN_TABLE. Other versions are unaffected.
svn-id: r23552
Diffstat (limited to 'sound')
-rw-r--r-- | sound/fmopl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp index ff16541732..a1c58ee310 100644 --- a/sound/fmopl.cpp +++ b/sound/fmopl.cpp @@ -637,10 +637,17 @@ static int OPLOpenTable(void) { /* allocate dynamic tables */ if((TL_TABLE = (int *)malloc(TL_MAX * 2 * sizeof(int))) == NULL) return 0; + +#ifdef __DS__ + // On the DS, use fast RAM for the sine table, since it thrashes the cache otherwise + SIN_TABLE = ((int **) (0x37F8000)); +#else if((SIN_TABLE = (int **)malloc(SIN_ENT * 4 * sizeof(int *))) == NULL) { free(TL_TABLE); return 0; } +#endif + if((AMS_TABLE = (int *)malloc(AMS_ENT * 2 * sizeof(int))) == NULL) { free(TL_TABLE); free(SIN_TABLE); @@ -1186,6 +1193,8 @@ FM_OPL *makeAdlibOPL(int rate) { env_bits = FMOPL_ENV_BITS_LQ; eg_ent = FMOPL_EG_ENT_LQ; } + env_bits = FMOPL_ENV_BITS_MQ; + eg_ent = FMOPL_EG_ENT_MQ; #endif OPLBuildTables(env_bits, eg_ent); |