LV2Core 4

lv2.h

Go to the documentation of this file.
00001 /*
00002   LV2 - An audio plugin interface specification.
00003   Copyright (C) 2006-2011 Steve Harris, David Robillard.
00004 
00005   Based on LADSPA:
00006   Copyright (C) 2000-2002 Richard W.E. Furse, Paul Barton-Davis,
00007                           Stefan Westerfeld.
00008  
00009   This header is free software; you can redistribute it and/or modify it
00010   under the terms of the GNU Lesser General Public License as published
00011   by the Free Software Foundation; either version 2.1 of the License,
00012   or (at your option) any later version.
00013  
00014   This header is distributed in the hope that it will be useful,
00015   but WITHOUT ANY WARRANTY; without even the implied warranty of
00016   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017   Lesser General Public License for more details.
00018  
00019   You should have received a copy of the GNU Lesser General Public
00020   License along with this library; if not, write to the Free Software
00021   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
00022   USA.
00023 */
00024 
00031 #ifndef LV2_H_INCLUDED
00032 #define LV2_H_INCLUDED
00033 
00034 #include <stdint.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00047 typedef void * LV2_Handle;
00048 
00060 typedef struct _LV2_Feature {
00066     const char * URI;
00067 
00076     void * data;
00077 } LV2_Feature;
00078 
00085 typedef struct _LV2_Descriptor {
00094     const char * URI;
00095 
00124     LV2_Handle (*instantiate)(const struct _LV2_Descriptor * descriptor,
00125                               double                         sample_rate,
00126                               const char *                   bundle_path,
00127                               const LV2_Feature *const *     features);
00128 
00163     void (*connect_port)(LV2_Handle instance,
00164                          uint32_t   port,
00165                          void *     data_location);
00166 
00188     void (*activate)(LV2_Handle instance);
00189 
00213     void (*run)(LV2_Handle instance,
00214                 uint32_t   sample_count);
00215 
00234     void (*deactivate)(LV2_Handle instance);
00235 
00247     void (*cleanup)(LV2_Handle instance);
00248 
00272     const void * (*extension_data)(const char * uri);
00273 } LV2_Descriptor;
00274 
00301 const LV2_Descriptor * lv2_descriptor(uint32_t index);
00302 
00306 typedef const LV2_Descriptor *
00307 (*LV2_Descriptor_Function)(uint32_t index);
00308 
00313 #ifdef WIN32
00314 #define LV2_SYMBOL_EXPORT __declspec(dllexport)
00315 #else
00316 #define LV2_SYMBOL_EXPORT
00317 #endif
00318 
00319 #ifdef __cplusplus
00320 }
00321 #endif
00322 
00323 #endif /* LV2_H_INCLUDED */