From c4145c33c0734ef39c8fa29affda567c36b3f4b3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 1 May 2008 20:56:33 +0000 Subject: Apply Ingen LV2 event referencing (stubs) patch from larsl. git-svn-id: http://svn.drobilla.net/lad/ingen@1190 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/LV2Info.cpp | 19 +++++++++++++++++-- src/libs/engine/LV2Info.hpp | 7 +++++++ 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'src/libs') diff --git a/src/libs/engine/LV2Info.cpp b/src/libs/engine/LV2Info.cpp index d1af757f..43d87d24 100644 --- a/src/libs/engine/LV2Info.cpp +++ b/src/libs/engine/LV2Info.cpp @@ -32,15 +32,22 @@ LV2Info::LV2Info(SLV2World world) , audio_class(slv2_value_new_uri(world, SLV2_PORT_CLASS_AUDIO)) , event_class(slv2_value_new_uri(world, SLV2_PORT_CLASS_EVENT)) , next_uri_id(1) - , lv2_features(new LV2_Feature*[2]) + , lv2_features(new LV2_Feature*[3]) { uri_map_feature_data.uri_to_id = &LV2Info::uri_map_uri_to_id; uri_map_feature_data.callback_data = this; uri_map_feature.URI = LV2_URI_MAP_URI; uri_map_feature.data = &uri_map_feature_data; + event_feature_data.lv2_event_ref= &LV2Info::event_ref; + event_feature_data.lv2_event_unref= &LV2Info::event_ref; + event_feature_data.callback_data = this; + event_feature.URI = LV2_EVENT_URI; + event_feature.data = &event_feature_data; + lv2_features[0] = &uri_map_feature; - lv2_features[1] = NULL; + lv2_features[1] = &event_feature; + lv2_features[2] = NULL; /* this is needed so we get a fixed type ID for MIDI, it would probably be better to make the type map accessible from any @@ -86,4 +93,12 @@ LV2Info::uri_map_uri_to_id(LV2_URI_Map_Callback_Data callback_data, } +uint32_t +LV2Info::event_ref(LV2_Event_Callback_Data callback_data, + LV2_Event* event) { + +} + + + } // namespace Ingen diff --git a/src/libs/engine/LV2Info.hpp b/src/libs/engine/LV2Info.hpp index ad314d77..61bfe468 100644 --- a/src/libs/engine/LV2Info.hpp +++ b/src/libs/engine/LV2Info.hpp @@ -28,6 +28,8 @@ #include #include "module/global.hpp" #include "lv2/uri_map/lv2_uri_map.h" +#include "lv2/event/lv2_event.h" + namespace Ingen { @@ -47,6 +49,8 @@ public: LV2_Feature uri_map_feature; LV2_URI_Map_Feature uri_map_feature_data; + LV2_Feature event_feature; + LV2_Event_Feature event_feature_data; typedef std::map URIMap; URIMap uri_map; @@ -56,6 +60,9 @@ public: const char* map, const char* uri); + static uint32_t event_ref(LV2_Event_Callback_Data callback_data, + LV2_Event* event); + LV2_Feature** lv2_features; }; -- cgit v1.2.1