Mercurial > hg > vamp-plugin-sdk
diff 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 |
line wrap: on
line diff
--- a/vamp/vamp.h Thu Jul 17 08:52:26 2008 +0000 +++ b/vamp/vamp.h Thu Jul 24 16:50:11 2008 +0000 @@ -197,16 +197,33 @@ } VampFeatureV2; +typedef union _VampFeatureUnion +{ + // sizeof(featureV1) >= sizeof(featureV2) for backward compatibility + VampFeature v1; + VampFeatureV2 v2; + +} VampFeatureUnion; + typedef struct _VampFeatureList { /** Number of features in this feature list. */ unsigned int featureCount; - /** Features in this feature list. May be NULL if featureCount is zero. */ - VampFeature *features; + /** Features in this feature list. May be NULL if featureCount is + zero. - /** Vamp 2.0 extended information for features in this feature list. */ - VampFeatureV2 *featuresV2; + If present, this array must contain featureCount feature + structures for a Vamp 1.0 plugin, or 2*featureCount feature + unions for a Vamp 2.0 plugin. + + The features returned by a Vamp 2.0 plugin must consist of the + same feature structures as in 1.0 for the first featureCount + array elements, followed by featureCount unions that contain + pointers to V2 feature structures (or NULL pointers if no V2 + feature structures are present). + */ + VampFeatureUnion *features; } VampFeatureList;