hw/audio/fmopl: Move ENV_CURVE to .heap to save 32KiB of .bss
This buffer is only used by the adlib audio device. Move it to the .heap to release 32KiB of .bss (size reported on x86_64 host). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
81ed0a5778
commit
2eea51bd01
@ -186,7 +186,7 @@ static int32_t *VIB_TABLE;
|
|||||||
|
|
||||||
/* envelope output curve table */
|
/* envelope output curve table */
|
||||||
/* attack + decay + OFF */
|
/* attack + decay + OFF */
|
||||||
static int32_t ENV_CURVE[2*EG_ENT+1];
|
static int32_t *ENV_CURVE;
|
||||||
|
|
||||||
/* multiple table */
|
/* multiple table */
|
||||||
#define ML 2
|
#define ML 2
|
||||||
@ -1090,6 +1090,7 @@ FM_OPL *OPLCreate(int clock, int rate)
|
|||||||
OPL->clock = clock;
|
OPL->clock = clock;
|
||||||
OPL->rate = rate;
|
OPL->rate = rate;
|
||||||
OPL->max_ch = max_ch;
|
OPL->max_ch = max_ch;
|
||||||
|
ENV_CURVE = g_new(int32_t, 2 * EG_ENT + 1);
|
||||||
/* init grobal tables */
|
/* init grobal tables */
|
||||||
OPL_initialize(OPL);
|
OPL_initialize(OPL);
|
||||||
/* reset chip */
|
/* reset chip */
|
||||||
@ -1127,6 +1128,7 @@ void OPLDestroy(FM_OPL *OPL)
|
|||||||
#endif
|
#endif
|
||||||
OPL_UnLockTable();
|
OPL_UnLockTable();
|
||||||
free(OPL);
|
free(OPL);
|
||||||
|
g_free(ENV_CURVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Option handlers ---------- */
|
/* ---------- Option handlers ---------- */
|
||||||
|
Loading…
Reference in New Issue
Block a user