Framer.h
Go to the documentation of this file.
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 2005-2006 Christian Landone.
8 
9  This program is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of the
12  License, or (at your option) any later version. See the file
13  COPYING included with this distribution for more information.
14 */
15 
16 #ifndef QM_DSP_FRAMER_H
17 #define QM_DSP_FRAMER_H
18 
19 #include <stdint.h>
20 
21 class Framer
22 {
23 public:
24  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);
32 
33  void resetCounters();
34 
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
44 
46 
47  int64_t m_srcIndex;
48 };
49 
50 #endif
void getFrame(double *dst)
Definition: Framer.cpp:53
int m_frameLength
Definition: Framer.h:42
void configure(int frameLength, int hop)
Definition: Framer.cpp:39
double * m_srcBuffer
Definition: Framer.h:39
int m_framesRead
Definition: Framer.h:37
double * m_dataFrame
Definition: Framer.h:40
int getMaxNoFrames()
Definition: Framer.cpp:87
Definition: Framer.h:21
double * m_strideFrame
Definition: Framer.h:41
int m_stepSize
Definition: Framer.h:43
void setSource(double *src, int64_t length)
Definition: Framer.cpp:92
Framer()
Definition: Framer.cpp:20
int64_t m_sampleLen
Definition: Framer.h:36
int64_t m_srcIndex
Definition: Framer.h:47
virtual ~Framer()
Definition: Framer.cpp:33
int m_maxFrames
Definition: Framer.h:45
void resetCounters()
Definition: Framer.cpp:81