summaryrefslogtreecommitdiff
path: root/opl/opl.h
diff options
context:
space:
mode:
authorSimon Howard2014-05-10 14:00:41 -0400
committerSimon Howard2014-05-10 14:00:41 -0400
commit495694da29ff736fba2fdc696553ee7197247174 (patch)
tree49c7cb18a42f9d5302aead68572a8deca8d9445a /opl/opl.h
parent541267071a118fe5cc702632fdba5817e27b6f76 (diff)
downloadchocolate-doom-495694da29ff736fba2fdc696553ee7197247174.tar.gz
chocolate-doom-495694da29ff736fba2fdc696553ee7197247174.tar.bz2
chocolate-doom-495694da29ff736fba2fdc696553ee7197247174.zip
opl: Add API to adjust tempo.
When the tempo is changed, the times on all active timers must be adjusted to match the new timing values. Add an API to do this and invoke it when a tempo change meta event is read.
Diffstat (limited to 'opl/opl.h')
-rw-r--r--opl/opl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/opl/opl.h b/opl/opl.h
index f0879b4d..d6a295b0 100644
--- a/opl/opl.h
+++ b/opl/opl.h
@@ -104,6 +104,11 @@ void OPL_InitRegisters(void);
void OPL_SetCallback(unsigned int ms, opl_callback_t callback, void *data);
+// Adjust callback times by the specified factor. For example, a value of
+// 0.5 will halve all remaining times.
+
+void OPL_AdjustCallbacks(float factor);
+
// Clear all OPL callbacks that have been set.
void OPL_ClearCallbacks(void);