summaryrefslogtreecommitdiff
path: root/opl/opl_queue.c
diff options
context:
space:
mode:
authorSimon Howard2009-08-30 12:07:04 +0000
committerSimon Howard2009-08-30 12:07:04 +0000
commit076adeb0aa24e9bdc677435ddb6e444db58d5436 (patch)
tree7f6ddcb1a9f320dcefabc4cd2f6d9338b54f4ae5 /opl/opl_queue.c
parent4d13a1330013cfcf70c8bc13f6183ea404bbdbe4 (diff)
downloadchocolate-doom-076adeb0aa24e9bdc677435ddb6e444db58d5436.tar.gz
chocolate-doom-076adeb0aa24e9bdc677435ddb6e444db58d5436.tar.bz2
chocolate-doom-076adeb0aa24e9bdc677435ddb6e444db58d5436.zip
Add method to clear all existing callbacks.
Subversion-branch: /branches/opl-branch Subversion-revision: 1642
Diffstat (limited to 'opl/opl_queue.c')
-rw-r--r--opl/opl_queue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/opl/opl_queue.c b/opl/opl_queue.c
index fe5f1ef8..f9d4c377 100644
--- a/opl/opl_queue.c
+++ b/opl/opl_queue.c
@@ -65,6 +65,11 @@ int OPL_Queue_IsEmpty(opl_callback_queue_t *queue)
return queue->num_entries == 0;
}
+void OPL_Queue_Clear(opl_callback_queue_t *queue)
+{
+ queue->num_entries = 0;
+}
+
void OPL_Queue_Push(opl_callback_queue_t *queue,
opl_callback_t callback, void *data,
unsigned int time)