aboutsummaryrefslogtreecommitdiff
path: root/pd/portaudio/portmidi-macosx/porttime.h
diff options
context:
space:
mode:
Diffstat (limited to 'pd/portaudio/portmidi-macosx/porttime.h')
-rw-r--r--pd/portaudio/portmidi-macosx/porttime.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/pd/portaudio/portmidi-macosx/porttime.h b/pd/portaudio/portmidi-macosx/porttime.h
new file mode 100644
index 00000000..8592106d
--- /dev/null
+++ b/pd/portaudio/portmidi-macosx/porttime.h
@@ -0,0 +1,30 @@
+/* porttime.h -- portable interface to millisecond timer */
+
+/* Should there be a way to choose the source of time here? */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+typedef enum {
+ ptNoError = 0,
+ ptHostError = -10000,
+ ptAlreadyStarted,
+ ptAlreadyStopped
+} PtError;
+
+
+typedef long PtTimestamp;
+
+typedef int (PtCallback)( PtTimestamp timestamp, void *userData );
+
+
+PtError Pt_Start(int resolution, PtCallback *callback, void *userData);
+PtError Pt_Stop();
+int Pt_Started();
+PtTimestamp Pt_Time();
+
+#ifdef __cplusplus
+}
+#endif