PortMidi
Cross-platform MIDI IO library
pmutil.h
Go to the documentation of this file.
1
12#ifdef __cplusplus
13extern "C" {
14#endif /* __cplusplus */
15
21typedef void PmQueue;
22
61PMEXPORT PmQueue *Pm_QueueCreate(long num_msgs, int32_t bytes_per_msg);
62
72PMEXPORT PmError Pm_QueueDestroy(PmQueue *queue);
73
87PMEXPORT PmError Pm_Dequeue(PmQueue *queue, void *msg);
88
99PMEXPORT PmError Pm_Enqueue(PmQueue *queue, void *msg);
100
113PMEXPORT int Pm_QueueFull(PmQueue *queue);
114
128PMEXPORT int Pm_QueueEmpty(PmQueue *queue);
129
157PMEXPORT void *Pm_QueuePeek(PmQueue *queue);
158
173PMEXPORT PmError Pm_SetOverflow(PmQueue *queue);
174
177#ifdef __cplusplus
178}
179#endif /* __cplusplus */
PmError
PortMidi error code; a common return type.
Definition: portmidi.h:100
PMEXPORT PmError Pm_Dequeue(PmQueue *queue, void *msg)
remove one message from the queue, copying it into msg.
Definition: pmutil.c:85
PMEXPORT PmError Pm_SetOverflow(PmQueue *queue)
allows the writer (enqueuer) to signal an overflow condition to the reader (dequeuer).
Definition: pmutil.c:164
PMEXPORT void * Pm_QueuePeek(PmQueue *queue)
get a pointer to the item at the head of the queue.
Definition: pmutil.c:248
PMEXPORT int Pm_QueueEmpty(PmQueue *queue)
test if the queue is empty.
Definition: pmutil.c:221
PMEXPORT int Pm_QueueFull(PmQueue *queue)
test if the queue is full.
Definition: pmutil.c:229
void PmQueue
The queue representation is opaque.
Definition: pmutil.h:21
PMEXPORT PmQueue * Pm_QueueCreate(long num_msgs, int32_t bytes_per_msg)
create a single-reader, single-writer queue.
Definition: pmutil.c:33
PMEXPORT PmError Pm_Enqueue(PmQueue *queue, void *msg)
insert one message into the queue, copying it from msg.
Definition: pmutil.c:179
PMEXPORT PmError Pm_QueueDestroy(PmQueue *queue)
destroy a queue and free its storage.
Definition: pmutil.c:70