comparison vamp/vamp.h @ 167:31eda4b11f2b

* First bit of Vamp v2 work -- add an optional duration to features in a backward compatible way. Warning: this code is unstable and experimental and may change significantly in the coming weeks.
author cannam
date Thu, 17 Jul 2008 08:52:26 +0000
parents 7fc1041daa9d
children 006a775133b1
comparison
equal deleted inserted replaced
166:120f88880347 167:31eda4b11f2b
48 * with older hosts and/or plugins. 48 * with older hosts and/or plugins.
49 * 49 *
50 * See also the vampApiVersion field in the plugin descriptor, and the 50 * See also the vampApiVersion field in the plugin descriptor, and the
51 * hostApiVersion argument to the vampGetPluginDescriptor function. 51 * hostApiVersion argument to the vampGetPluginDescriptor function.
52 */ 52 */
53 #define VAMP_API_VERSION 1 53 #define VAMP_API_VERSION 2
54 54
55 /** 55 /**
56 * C language API for Vamp plugins. 56 * C language API for Vamp plugins.
57 * 57 *
58 * This is the formal plugin API for Vamp. Plugin authors may prefer 58 * This is the formal plugin API for Vamp. Plugin authors may prefer
182 /** Label for this returned sample. May be NULL. */ 182 /** Label for this returned sample. May be NULL. */
183 char *label; 183 char *label;
184 184
185 } VampFeature; 185 } VampFeature;
186 186
187 typedef struct _VampFeatureV2
188 {
189 /** 1 if the feature has a duration. */
190 int hasDuration;
191
192 /** Seconds component of duratiion. */
193 int durationSec;
194
195 /** Nanoseconds component of duration. */
196 int durationNsec;
197
198 } VampFeatureV2;
199
187 typedef struct _VampFeatureList 200 typedef struct _VampFeatureList
188 { 201 {
189 /** Number of features in this feature list. */ 202 /** Number of features in this feature list. */
190 unsigned int featureCount; 203 unsigned int featureCount;
191 204
192 /** Features in this feature list. May be NULL if featureCount is zero. */ 205 /** Features in this feature list. May be NULL if featureCount is zero. */
193 VampFeature *features; 206 VampFeature *features;
207
208 /** Vamp 2.0 extended information for features in this feature list. */
209 VampFeatureV2 *featuresV2;
194 210
195 } VampFeatureList; 211 } VampFeatureList;
196 212
197 typedef enum 213 typedef enum
198 { 214 {