diff --git a/Frameworks/AudioOverload/aosdk/eng_ssf/eng_ssf.c b/Frameworks/AudioOverload/aosdk/eng_ssf/eng_ssf.c index 8c0cf245c..28cb40eac 100644 --- a/Frameworks/AudioOverload/aosdk/eng_ssf/eng_ssf.c +++ b/Frameworks/AudioOverload/aosdk/eng_ssf/eng_ssf.c @@ -144,6 +144,7 @@ int32 ssf_start(uint8 *buffer, uint32 length) // Dispose the corlett structure for the lib - we don't use it free(lib); + free(lib_decoded); } } @@ -271,6 +272,9 @@ int32 ssf_gen(int16 *buffer, uint32 samples) int32 ssf_stop(void) { + scsp_stop(); + free(c); + return AO_SUCCESS; } diff --git a/Frameworks/AudioOverload/aosdk/eng_ssf/scsp.c b/Frameworks/AudioOverload/aosdk/eng_ssf/scsp.c index 0b69f1ef4..f1e695301 100644 --- a/Frameworks/AudioOverload/aosdk/eng_ssf/scsp.c +++ b/Frameworks/AudioOverload/aosdk/eng_ssf/scsp.c @@ -1169,6 +1169,14 @@ void *scsp_start(const void *config) return SCSP; } +void scsp_stop(void) +{ + free(AllocedSCSP->buffertmpl); + free(AllocedSCSP->buffertmpr); + + free(AllocedSCSP); +} + void SCSP_set_ram_base(int which, void *base) { diff --git a/Frameworks/AudioOverload/aosdk/eng_ssf/scsp.h b/Frameworks/AudioOverload/aosdk/eng_ssf/scsp.h index 345c78b80..56c82f713 100644 --- a/Frameworks/AudioOverload/aosdk/eng_ssf/scsp.h +++ b/Frameworks/AudioOverload/aosdk/eng_ssf/scsp.h @@ -20,11 +20,13 @@ struct SCSPinterface { int num; void *region[MAX_SCSP]; - int mixing_level[MAX_SCSP]; /* volume */ + int mixing_level[MAX_SCSP]; /* volume */ void (*irq_callback[MAX_SCSP])(int state); /* irq callback */ }; void *scsp_start(const void *config); +void scsp_stop(void); + void SCSP_Update(void *param, INT16 **inputs, INT16 **buf, int samples); #define READ16_HANDLER(name) data16_t name(offs_t offset, data16_t mem_mask)