summaryrefslogtreecommitdiffstats
path: root/noatun/modules/winskin/vis/winSkinFFT_impl.h
blob: c1a77e4545ad92b9a2d1ffb3f4ccf73d7fb5391a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
  implementation for winskin fft
  Copyright (C) 2000  Martin Vogt

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU Library General Public License as published by
  the Free Software Foundation.

  For more information look at the file COPYRIGHT in this package

 */


#ifndef __WINSKINFFT_IMPL_H
#define __WINSKINFFT_IMPL_H

#include <artsflow.h>
#include <stdsynthmodule.h>
#include "winskinvis.h"
#include "realFFTFilter.h"
#include "visQueue.h"


using namespace std;
using namespace Arts;

namespace Noatun {

class WinSkinFFT_impl : public WinSkinFFT_skel, public StdSynthModule {
  
 public:
  
  WinSkinFFT_impl();
  ~WinSkinFFT_impl();
  
  void streamInit();
  void streamStart();
  
  // in:  audio stream inleft,  inright;
  // out: audio stream outleft, outright;
  void calculateBlock(unsigned long samples);
  
  void bandResolution(float res);
  float bandResolution();
  vector<float> *scope();

 private:
  RealFFTFilter* realFFTFilter;
  int fftBands_short;
  int* fftArray;
  VISQueue* visQueue;
  int bands;

  int fragCnt;
  int writePos;
  int readPos;
};


}

#endif