1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-04 23:14:47 -04:00

FCDProPlus: moved open/close source to input so that open source failure is correctly reported as an error

This commit is contained in:
f4exb
2018-11-18 21:56:33 +01:00
parent f5357e9917
commit 865d26cc15
5 changed files with 129 additions and 105 deletions
@@ -21,24 +21,23 @@
#include <QThread>
#include <QMutex>
#include <QWaitCondition>
#include "dsp/inthalfbandfilter.h"
#include <alsa/asoundlib.h>
#include "dsp/inthalfbandfilter.h"
#include "dsp/samplesinkfifo.h"
class FCDProPlusThread : public QThread {
Q_OBJECT
public:
FCDProPlusThread(SampleSinkFifo* sampleFifo, QObject* parent = NULL);
FCDProPlusThread(SampleSinkFifo* sampleFifo, snd_pcm_t *fcd_handle, QObject* parent = nullptr);
~FCDProPlusThread();
void startWork();
void stopWork();
bool OpenSource(const char *filename);
void CloseSource();
private:
snd_pcm_t* fcd_handle;
snd_pcm_t* m_fcd_handle;
QMutex m_startWaitMutex;
QWaitCondition m_startWaiter;