Mercurial > hg > qm-dsp
comparison dsp/signalconditioning/Framer.h @ 225:49844bc8a895
* Queen Mary C++ DSP library
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 05 Apr 2006 17:35:59 +0000 |
parents | |
children | e5907ae6de17 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 225:49844bc8a895 |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 QM DSP Library | |
5 | |
6 Centre for Digital Music, Queen Mary, University of London. | |
7 This file copyright 2005-2006 Christian Landone. | |
8 All rights reserved. | |
9 */ | |
10 | |
11 #ifndef FRAMER_H | |
12 #define FRAMER_H | |
13 | |
14 //#include <io.h> | |
15 #include <fcntl.h> | |
16 #include <stdio.h> | |
17 | |
18 | |
19 class Framer | |
20 { | |
21 public: | |
22 void setSource( double* src, unsigned int length ); | |
23 unsigned int getMaxNoFrames(); | |
24 void getFrame( double* dst ); | |
25 void configure( unsigned int frameLength, unsigned int hop ); | |
26 Framer(); | |
27 virtual ~Framer(); | |
28 | |
29 void resetCounters(); | |
30 | |
31 private: | |
32 | |
33 unsigned long m_ulSampleLen; // DataLength (samples) | |
34 unsigned int m_framesRead; // Read Frames Index | |
35 | |
36 double* m_srcBuffer; | |
37 double* m_dataFrame; // Analysis Frame Buffer | |
38 double* m_strideFrame; // Stride Frame Buffer | |
39 unsigned int m_frameLength; // Analysis Frame Length | |
40 unsigned int m_stepSize; // Analysis Frame Stride | |
41 | |
42 unsigned int m_maxFrames; | |
43 | |
44 unsigned long m_ulSrcIndex; | |
45 }; | |
46 | |
47 #endif |