globally remove all trailing whitespace from ardour code base.
[ardour.git] / libs / qm-dsp / dsp / signalconditioning / Framer.h
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 FRAMER_H
17 #define FRAMER_H
18
19 //#include <io.h>
20 #include <fcntl.h>
21 #include <stdio.h>
22
23
24 class Framer
25 {
26 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();
32     virtual ~Framer();
33
34     void resetCounters();
35
36 private:
37
38     unsigned long       m_ulSampleLen;          // DataLength (samples)
39     unsigned int        m_framesRead;           // Read Frames Index
40
41     double*                     m_srcBuffer;
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 };
51
52 #endif