summaryrefslogtreecommitdiff
path: root/psg.c
diff options
context:
space:
mode:
Diffstat (limited to 'psg.c')
-rw-r--r--psg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/psg.c b/psg.c
index 33484ad..a33aa7c 100644
--- a/psg.c
+++ b/psg.c
@@ -24,6 +24,15 @@ void psg_init(psg_context * context, uint32_t sample_rate, uint32_t master_clock
}
}
+void psg_free(psg_context *context)
+{
+ free(context->audio_buffer);
+ //TODO: Figure out how to make this 100% safe
+ //audio thread could still be using this
+ free(context->back_buffer);
+ free(context);
+}
+
#define BUFFER_INC_RES 1000000000UL
void psg_adjust_master_clock(psg_context * context, uint32_t master_clock)