comparison vamp/vamp.h @ 168:006a775133b1

* Re-do the way the v2 structure (with durations) is returned. I bungled backward compatibility -- I failed to spot the contiguous array returned from process()... duh. Also bump library versions.
author cannam
date Thu, 24 Jul 2008 16:50:11 +0000
parents 31eda4b11f2b
children d4fbd4e6fdbf
comparison
equal deleted inserted replaced
167:31eda4b11f2b 168:006a775133b1
195 /** Nanoseconds component of duration. */ 195 /** Nanoseconds component of duration. */
196 int durationNsec; 196 int durationNsec;
197 197
198 } VampFeatureV2; 198 } VampFeatureV2;
199 199
200 typedef union _VampFeatureUnion
201 {
202 // sizeof(featureV1) >= sizeof(featureV2) for backward compatibility
203 VampFeature v1;
204 VampFeatureV2 v2;
205
206 } VampFeatureUnion;
207
200 typedef struct _VampFeatureList 208 typedef struct _VampFeatureList
201 { 209 {
202 /** Number of features in this feature list. */ 210 /** Number of features in this feature list. */
203 unsigned int featureCount; 211 unsigned int featureCount;
204 212
205 /** Features in this feature list. May be NULL if featureCount is zero. */ 213 /** Features in this feature list. May be NULL if featureCount is
206 VampFeature *features; 214 zero.
207 215
208 /** Vamp 2.0 extended information for features in this feature list. */ 216 If present, this array must contain featureCount feature
209 VampFeatureV2 *featuresV2; 217 structures for a Vamp 1.0 plugin, or 2*featureCount feature
218 unions for a Vamp 2.0 plugin.
219
220 The features returned by a Vamp 2.0 plugin must consist of the
221 same feature structures as in 1.0 for the first featureCount
222 array elements, followed by featureCount unions that contain
223 pointers to V2 feature structures (or NULL pointers if no V2
224 feature structures are present).
225 */
226 VampFeatureUnion *features;
210 227
211 } VampFeatureList; 228 } VampFeatureList;
212 229
213 typedef enum 230 typedef enum
214 { 231 {