SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
fcdproplusthread.h
Go to the documentation of this file.
1 // Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
3 // written by Christian Daniel //
4 // //
5 // This program is free software; you can redistribute it and/or modify //
6 // it under the terms of the GNU General Public License as published by //
7 // the Free Software Foundation as version 3 of the License, or //
8 // (at your option) any later version. //
9 // //
10 // This program is distributed in the hope that it will be useful, //
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 // GNU General Public License V3 for more details. //
14 // //
15 // You should have received a copy of the GNU General Public License //
16 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
18 
19 #ifndef INCLUDE_FCDTHREAD_H
20 #define INCLUDE_FCDTHREAD_H
21 
22 #include <QThread>
23 #include <QMutex>
24 #include <QWaitCondition>
25 
26 #include "dsp/samplesinkfifo.h"
27 #include "dsp/decimators.h"
28 #include "fcdtraits.h"
29 
30 class AudioFifo;
31 
32 class FCDProPlusThread : public QThread {
33  Q_OBJECT
34 
35 public:
36  FCDProPlusThread(SampleSinkFifo* sampleFifo, AudioFifo *fcdFIFO, QObject* parent = nullptr);
38 
39  void startWork();
40  void stopWork();
41  void setLog2Decimation(unsigned int log2_decim);
42  void setFcPos(int fcPos);
43 
44 private:
46 
48  QWaitCondition m_startWaiter;
49  bool m_running;
50  unsigned int m_log2Decim;
51  int m_fcPos;
52 
53  qint16 m_buf[fcd_traits<ProPlus>::convBufSize*2]; // stereo (I, Q)
57 
58  void run();
59  void work(unsigned int n_items);
60 };
61 #endif // INCLUDE_FCDTHREAD_H
Decimators< qint32, qint16, SDR_RX_SAMP_SZ, 16 > m_decimators
std::vector< Sample > SampleVector
Definition: dsptypes.h:96
SampleVector m_convertBuffer
FCDProPlusThread(SampleSinkFifo *sampleFifo, AudioFifo *fcdFIFO, QObject *parent=nullptr)
void setFcPos(int fcPos)
AudioFifo * m_fcdFIFO
void setLog2Decimation(unsigned int log2_decim)
qint16 m_buf[fcd_traits< ProPlus >::convBufSize *2]
void work(unsigned int n_items)
unsigned int m_log2Decim
QWaitCondition m_startWaiter
SampleSinkFifo * m_sampleFifo