aboutsummaryrefslogtreecommitdiff
path: root/desiredata/portmidi_osx/porttime.h
blob: fb57fe7dc3833ee6695aa81914ccc04e21be3716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* porttime.h -- portable interface to millisecond timer
 *
 * 27Jun02 XJS - altered type of Pt_Time() (in porttime.h & portmidi.c) so it matches PmTimeProcPtr
 */

/* 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(void); // xjs, added void
int Pt_Started(void);  // xjs, added void
PtTimestamp Pt_Time(void *time_info);  /* xjs - added void *time_info so this f() is a PmTimeProcPtr, defined in portmidi.h */

#ifdef __cplusplus
}
#endif