Mercurial > hg > qm-dsp
annotate dsp/segmentation/segment.h @ 18:8e90a56b4b5f
* merge in segmentation code from soundbite plugin/library repository
author | cannam |
---|---|
date | Wed, 09 Jan 2008 10:46:25 +0000 |
parents | |
children | 8bdbda7fb893 |
rev | line source |
---|---|
cannam@18 | 1 #ifndef _SEGMENT_H |
cannam@18 | 2 #define _SEGMENT_H |
cannam@18 | 3 |
cannam@18 | 4 /* |
cannam@18 | 5 * segment.h |
cannam@18 | 6 * soundbite |
cannam@18 | 7 * |
cannam@18 | 8 * Created by Mark Levy on 06/04/2006. |
cannam@18 | 9 * Copyright 2006 Centre for Digital Music, Queen Mary, University of London. All rights reserved. |
cannam@18 | 10 * |
cannam@18 | 11 */ |
cannam@18 | 12 |
cannam@18 | 13 typedef struct segment_t |
cannam@18 | 14 { |
cannam@18 | 15 long start; /* in samples */ |
cannam@18 | 16 long end; |
cannam@18 | 17 int type; |
cannam@18 | 18 } segment_t; |
cannam@18 | 19 |
cannam@18 | 20 typedef struct segmentation_t |
cannam@18 | 21 { |
cannam@18 | 22 int nsegs; /* number of segments */ |
cannam@18 | 23 int nsegtypes; /* number of segment types, so possible types are {0,1,...,nsegtypes-1} */ |
cannam@18 | 24 int samplerate; |
cannam@18 | 25 segment_t* segments; |
cannam@18 | 26 } segmentation_t; |
cannam@18 | 27 |
cannam@18 | 28 typedef enum |
cannam@18 | 29 { |
cannam@18 | 30 FEATURE_TYPE_UNKNOWN = 0, |
cannam@18 | 31 FEATURE_TYPE_CONSTQ = 1, |
cannam@18 | 32 FEATURE_TYPE_CHROMA |
cannam@18 | 33 } feature_types; |
cannam@18 | 34 |
cannam@18 | 35 #endif |
cannam@18 | 36 |