summaryrefslogtreecommitdiff
path: root/opl/opl_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'opl/opl_timer.c')
-rw-r--r--opl/opl_timer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/opl/opl_timer.c b/opl/opl_timer.c
index 62ffbd37..e254a5e2 100644
--- a/opl/opl_timer.c
+++ b/opl/opl_timer.c
@@ -202,6 +202,13 @@ void OPL_Timer_SetCallback(unsigned int ms, opl_callback_t callback, void *data)
SDL_UnlockMutex(callback_queue_mutex);
}
+void OPL_Timer_ClearCallbacks(void)
+{
+ SDL_LockMutex(callback_queue_mutex);
+ OPL_Queue_Clear(callback_queue);
+ SDL_UnlockMutex(callback_queue_mutex);
+}
+
void OPL_Timer_Lock(void)
{
SDL_LockMutex(timer_mutex);