comparison dsp/signalconditioning/Framer.h @ 505:930b5b0f707d

Merge branch 'codestyle-and-tidy'
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 05 Jun 2019 12:55:15 +0100
parents 162673c8f9de
children
comparison
equal deleted inserted replaced
471:e3335cb213da 505:930b5b0f707d
11 published by the Free Software Foundation; either version 2 of the 11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifndef FRAMER_H 16 #ifndef QM_DSP_FRAMER_H
17 #define FRAMER_H 17 #define QM_DSP_FRAMER_H
18 18
19 //#include <io.h> 19 #include <stdint.h>
20 #include <fcntl.h>
21 #include <stdio.h>
22
23 20
24 class Framer 21 class Framer
25 { 22 {
26 public: 23 public:
27 void setSource( double* src, unsigned int length );
28 unsigned int getMaxNoFrames();
29 void getFrame( double* dst );
30 void configure( unsigned int frameLength, unsigned int hop );
31 Framer(); 24 Framer();
32 virtual ~Framer(); 25 virtual ~Framer();
26
27 void setSource(double* src, int64_t length);
28 void configure(int frameLength, int hop);
29
30 int getMaxNoFrames();
31 void getFrame(double* dst);
33 32
34 void resetCounters(); 33 void resetCounters();
35 34
36 private: 35 private:
36 int64_t m_sampleLen; // DataLength (samples)
37 int m_framesRead; // Read Frames Index
38
39 double* m_srcBuffer;
40 double* m_dataFrame; // Analysis Frame Buffer
41 double* m_strideFrame; // Stride Frame Buffer
42 int m_frameLength; // Analysis Frame Length
43 int m_stepSize; // Analysis Frame Stride
37 44
38 unsigned long m_ulSampleLen; // DataLength (samples) 45 int m_maxFrames;
39 unsigned int m_framesRead; // Read Frames Index
40 46
41 double* m_srcBuffer; 47 int64_t m_srcIndex;
42 double* m_dataFrame; // Analysis Frame Buffer
43 double* m_strideFrame; // Stride Frame Buffer
44 unsigned int m_frameLength; // Analysis Frame Length
45 unsigned int m_stepSize; // Analysis Frame Stride
46
47 unsigned int m_maxFrames;
48
49 unsigned long m_ulSrcIndex;
50 }; 48 };
51 49
52 #endif 50 #endif