RAUL  0.5.1
lv2_event.h
Go to the documentation of this file.
1 /* lv2_event.h - C header file for the LV2 events extension.
2  *
3  * Copyright (C) 2006-2007 Lars Luthman <lars.luthman@gmail.com>
4  * Copyright (C) 2008 Dave Robillard <dave@drobilla.net>
5  *
6  * This header is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published
8  * by the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This header is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this header; if not, write to the Free Software Foundation,
18  * Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA
19  */
20 
21 #ifndef LV2_EVENT_H
22 #define LV2_EVENT_H
23 
24 #define LV2_EVENT_URI "http://lv2plug.in/ns/ext/event"
25 #define LV2_EVENT_AUDIO_STAMP 0
26 
27 #include <stdint.h>
28 
49 static const uint32_t LV2_EVENT_PPQN = 3136573440U;
50 
51 
65 typedef struct {
66 
72  uint32_t frames;
73 
78  uint32_t subframes;
79 
95  uint16_t type;
96 
100  uint16_t size;
101 
102  /* size bytes of data follow here */
103 
104 } LV2_Event;
105 
106 
107 
123 typedef struct {
124 
130  uint8_t* data;
131 
138  uint16_t header_size;
139 
160  uint16_t stamp_type;
161 
170  uint32_t event_count;
171 
176  uint32_t capacity;
177 
188  uint32_t size;
189 
191 
192 
195 
196 
203 typedef struct {
204 
211 
232  uint32_t (*lv2_event_ref)(LV2_Event_Callback_Data callback_data,
233  LV2_Event* event);
234 
253  uint32_t (*lv2_event_unref)(LV2_Event_Callback_Data callback_data,
254  LV2_Event* event);
255 
257 
258 
259 #endif // LV2_EVENT_H
260 
LV2_Event_Callback_Data callback_data
Opaque pointer to host data.
Definition: lv2_event.h:210
uint16_t stamp_type
The type of the time stamps for events in this buffer.
Definition: lv2_event.h:160
A buffer of LV2 events (header only).
Definition: lv2_event.h:123
uint32_t frames
The frames portion of timestamp.
Definition: lv2_event.h:72
uint32_t event_count
The number of events in this buffer.
Definition: lv2_event.h:170
An LV2 event (header only).
Definition: lv2_event.h:65
The data field of the LV2_Feature for this extension.
Definition: lv2_event.h:203
uint32_t size
The size of the initial portion of the data buffer containing data.
Definition: lv2_event.h:188
uint8_t * data
The contents of the event buffer.
Definition: lv2_event.h:130
void * LV2_Event_Callback_Data
Opaque pointer to host data.
Definition: lv2_event.h:194
uint16_t type
The type of this event, as a number which represents some URI defining an event type.
Definition: lv2_event.h:95
uint16_t size
The size of the data portion of this event in bytes, which immediately follows.
Definition: lv2_event.h:100
uint32_t capacity
The size of the data buffer in bytes.
Definition: lv2_event.h:176
uint32_t subframes
The sub-frames portion of timestamp.
Definition: lv2_event.h:78
uint16_t header_size
The size of this event header in bytes (including everything).
Definition: lv2_event.h:138