-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
80 lines (66 loc) · 2.07 KB
/
mainwindow.h
File metadata and controls
80 lines (66 loc) · 2.07 KB
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
70
71
72
73
74
75
76
77
78
79
80
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QDropEvent>
#include <QUrl>
#include <QPushButton>
#include <QSlider>
#include <QLabel>
#include <QTextEdit>
#include <QTextList>
#include "qcustomplot.h"
#include "CWavRW.h"
#include "CRtAudio.h"
#include "CRtAudio.h"
#include "CMpgRead.h"
#include "fft.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void playHandle();
void stopHandle();
void recHandle();
void prevHandle();
void nextHandle();
void positionSliderPressHandle();
void positionSliderReleaseHandle();
void inPlotUpdate();
void outPlotUpdate();
void eofHandle();
private:
void wavToSoundcardInit();
void wavToSoundcardCleanup();
void mpgToSoundcardInit();
void mpgToSoundcardCleanup();
void soundcardToWavInit();
void soundcardToWavCleanup();
void dragEnterEvent(QDragEnterEvent *dragEnterEventData);
void dropEvent(QDropEvent *dropEventData);
QColor backgroundColor;
QCustomPlot *audioInPlot, *freqInPlot, *audioOutPlot, *freqOutPlot;
QVector<unsigned int> logIdxVector;
QVector<double> xTimeInPlot, xTimeOutPlot, yTimeInPlot, yTimeOutPlot;
QVector<double> xFreqInPlot, xFreqOutPlot, yFreqInPlot, yFreqOutPlot, tmpFreq;
QVector<complex_float64> complexFreqVec;
QTimer *inPlotTimer, *outPlotTimer;
QPushButton *playButton, *stopButton, *recButton, *prevButton, *nextButton;
QIcon mydoobeIcon, playIcon, stopIcon, pauseIcon, recIcon, prevIcon, nextIcon;
QTextEdit *statusTxt, *playlist;
QList<QString> playlistFiles;
QSlider *positionSlider;
CWavRead *wavRead;
CMpgRead *mpgRead;
CWavWrite *wavWrite;
CRtAudio *adc, *dac;
QString outFile;
RtAudio::Api audioApi;
double fftNormFact;
unsigned int blockLenIO, nfft, fsIn, fsOut, nChansIn, nChansOut, nBuffers;
int playlistIdx, prevPlaylistIdx;
bool bPlay, bRec, bSliderPressed, bWavReadInitialized, bWavWriteInitialized, bMpgReadInitialized;
};
#endif // MAINWINDOW_H