diff options
author | Max Horn | 2008-11-17 11:07:04 +0000 |
---|---|---|
committer | Max Horn | 2008-11-17 11:07:04 +0000 |
commit | be0f709be952bbae25d4cca98ab5cf218647b1a7 (patch) | |
tree | 1cd0c3af9e6ac92f63faeb0c127707a39fef372c /sound | |
parent | 57e7d5ef62fced27a6c9c9aa50598643f8b0bc41 (diff) | |
download | scummvm-rg350-be0f709be952bbae25d4cca98ab5cf218647b1a7.tar.gz scummvm-rg350-be0f709be952bbae25d4cca98ab5cf218647b1a7.tar.bz2 scummvm-rg350-be0f709be952bbae25d4cca98ab5cf218647b1a7.zip |
Saving 32kb DATA size
svn-id: r35103
Diffstat (limited to 'sound')
-rw-r--r-- | sound/fmopl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp index 4055ef6ba6..97a21d6a7c 100644 --- a/sound/fmopl.cpp +++ b/sound/fmopl.cpp @@ -179,7 +179,8 @@ static int *VIB_TABLE; /* envelope output curve table */ /* attack + decay + OFF */ //static int ENV_CURVE[2*EG_ENT+1]; -static int ENV_CURVE[2 * 4096 + 1]; // to keep it static ... +//static int ENV_CURVE[2 * 4096 + 1]; // to keep it static ... +static int *ENV_CURVE; /* multiple table */ @@ -692,6 +693,9 @@ static int OPLOpenTable(void) { SIN_TABLE[SIN_ENT * 3 + s] = (s / (SIN_ENT / 4)) & 1 ? &TL_TABLE[EG_ENT] : SIN_TABLE[SIN_ENT * 2 + s]; } + + ENV_CURVE = (int *)malloc(sizeof(int) * (2*EG_ENT+1)); + /* envelope counter -> envelope output table */ for (i=0; i < EG_ENT; i++) { /* ATTACK curve */ @@ -724,6 +728,7 @@ static void OPLCloseTable(void) { free(SIN_TABLE); free(AMS_TABLE); free(VIB_TABLE); + free(ENV_CURVE); } /* CSM Key Controll */ |