File: m_spectrum.h

package info (click to toggle)
ams 1.8.7-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,880 kB
  • ctags: 2,171
  • sloc: cpp: 17,793; makefile: 433; sh: 101
file content (69 lines) | stat: -rw-r--r-- 1,579 bytes parent folder | download | duplicates (3)
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
63
64
65
66
67
68
69
#ifndef M_SPECTRUM_H
#define M_SPECTRUM_H

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <qwidget.h>
#include <qstring.h>
#include <qslider.h>   
#include <qcheckbox.h>  
#include <qlabel.h>
#include <qvbox.h>
#include <qhbox.h>
#include <qspinbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qdialog.h>
#include <qtimer.h>
#include <alsa/asoundlib.h>
#include "synthdata.h"
#include "module.h"
#include "port.h"

#define MODULE_SPECTRUM_WIDTH                 90
#define MODULE_SPECTRUM_HEIGHT                80

class M_spectrum : public Module
{
  Q_OBJECT

  private:
    float zoom;
    float gain;
    float mixer_gain[2]; 
    int agc;
    Port *port_in[2];
    float *floatdata;
    QTimer *timer;
    int viewMode, fftFrames, normMode, fftMode, window, refreshMode;
    float freqZoom, f_min, f_max;
    QLabel *minLabel, *maxLabel;
    
  public: 
    float **inData[2];
                            
  public:
    M_spectrum(QWidget* parent=0, const char *name=0, SynthData *p_synthdata=0);
    ~M_spectrum();
    int setGain(float p_gain);
    float getGain();

  public slots:
    void generateCycle();
    void showConfigDialog();
    void timerProc();
    void updateFFTFrames(int val);
    void updateViewMode(int val);
    void updateZoom(int val);
    void update_f_min(int val);
    void update_f_max(int val);
    void updateNormMode(int val);
    void updateWindow(int val);
    void updateFFTMode(int val);
    void updateRefreshMode(int val);
    void freqZoomToggled(bool on);
    void startSpectrum();
};
  
#endif