mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 08:04:49 -05:00
Race condition.
This commit is contained in:
parent
3ec45e00ad
commit
9d18a9a1e9
@ -93,8 +93,8 @@ bool FCDInput::startInput(int device)
|
||||
|
||||
m_deviceDescription = QString("Funcube Dongle");
|
||||
|
||||
if (!applySettings(m_generalSettings, m_settings, true))
|
||||
qCritical("FCD: Unable to set config at start");
|
||||
// if (!applySettings(m_generalSettings, m_settings, true))
|
||||
// qCritical("FCD: Unable to set config at start");
|
||||
|
||||
qDebug("FCDInput: start");
|
||||
return true;
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
bool FCDThread::OpenSource(const char* cardname)
|
||||
{
|
||||
bool fail = false;
|
||||
snd_pcm_hw_params_t* params;
|
||||
//fcd_rate = FCDPP_RATE;
|
||||
//fcd_channels =2;
|
||||
@ -28,14 +29,21 @@ bool FCDThread::OpenSource(const char* cardname)
|
||||
|
||||
snd_pcm_hw_params_alloca(¶ms);
|
||||
if ( snd_pcm_hw_params_any(fcd_handle, params) < 0 )
|
||||
qCritical("Funcube Dongle read settings failed");
|
||||
else if ( snd_pcm_hw_params(fcd_handle, params) < 0 )
|
||||
qCritical("Funcube Dongle write settings failed");
|
||||
// TODO: check actual samplerate, may be crippled firmware
|
||||
|
||||
if ( snd_pcm_start(fcd_handle) < 0 )
|
||||
fail = true;
|
||||
else if ( snd_pcm_hw_params(fcd_handle, params) < 0 ) {
|
||||
fail = true;
|
||||
// TODO: check actual samplerate, may be crippled firmware
|
||||
} else {
|
||||
if ( snd_pcm_start(fcd_handle) < 0 )
|
||||
fail = true;
|
||||
}
|
||||
if (fail) {
|
||||
qCritical("Funcube Dongle stream start failed");
|
||||
else qDebug("Funcube stream started");
|
||||
snd_pcm_close( fcd_handle );
|
||||
return false;
|
||||
} else {
|
||||
qDebug("Funcube stream started");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
FCDThread::FCDThread(SampleFifo* sampleFifo, QObject* parent) :
|
||||
QThread(parent),
|
||||
fcd_handle(NULL),
|
||||
m_running(false),
|
||||
m_convertBuffer(BLOCKSIZE),
|
||||
m_sampleFifo(sampleFifo)
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
int work(int n_items);
|
||||
private:
|
||||
snd_pcm_format_t fcd_format;
|
||||
snd_pcm_t* fcd_handle = NULL;
|
||||
snd_pcm_t* fcd_handle;
|
||||
|
||||
QMutex m_startWaitMutex;
|
||||
QWaitCondition m_startWaiter;
|
||||
|
@ -96,7 +96,7 @@ bool V4LInput::startInput(int device)
|
||||
|
||||
qDebug("V4LInput: start");
|
||||
MsgReportV4L::create(m_gains)->submit(m_guiMessageQueue);
|
||||
applySettings(m_generalSettings, m_settings, true);
|
||||
// applySettings(m_generalSettings, m_settings, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user